From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27858 invoked by alias); 15 Jan 2014 14:13:59 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27830 invoked by uid 48); 15 Jan 2014 14:13:54 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/59828] New: Broken assembly on ppc* with two -mcpu= options Date: Wed, 15 Jan 2014 14:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg01589.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59828 Bug ID: 59828 Summary: Broken assembly on ppc* with two -mcpu= options Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org gcc -m32 -O2 -mcpu=750 -mcpu=power7 -c test.c results in assembler complaining: Error: junk at end of line: `1' While the last -mcpu= option wins for compilation flags, when determining gas options to be passed to the assembler rs6000.h uses a sequence matching each -mcpu= individually, and -mcpu=750 is handled there after -mcpu=power7 and thus overrides the power7 ISA in as flags with 750 ISA flags. Don't know the *.opt stuff enough if there is a way even for the -mcpu= etc. options to cancel all previous occurences with different strings from matching, if not, perhaps at least the list in rs6000.h should be sorted such that at least in most cases assembler flags that are superset of others are before flags for the subsets. typedef struct { int channels; void *codec_setup; } vorbis_info; typedef struct vorbis_dsp_state { vorbis_info *vi; float **pcm; long W; void *backend_state; } vorbis_dsp_state; typedef struct vorbis_block { float **pcm; } vorbis_block; typedef struct private_state { int window[2]; } private_state; typedef struct highlevel_byblocktype { long blocksizes[2]; int halfrate_flag; } codec_setup_info; extern float *_vorbis_window_get (int n); void vorbis_synthesis_blockin (vorbis_dsp_state * v, vorbis_block * vb) { vorbis_info *vi = v->vi; codec_setup_info *ci = vi->codec_setup; private_state *b = v->backend_state; int hs = ci->halfrate_flag; int i, j; int n = ci->blocksizes[v->W] >> (hs + 1); int n0 = ci->blocksizes[0] >> (hs + 1); int n1 = ci->blocksizes[1] >> (hs + 1); int thisCenter = 0, prevCenter = 0; for (j = 0; j < vi->channels; j++) { float *w = _vorbis_window_get (b->window[1] - hs); float *pcm = v->pcm[j] + prevCenter; float *p = vb->pcm[j]; for (i = 0; i < n1; i++) pcm[i] = pcm[i] * w[n1 - i - 1] + p[i] * w[i]; float *w2 = _vorbis_window_get (b->window[0] - hs); float *pcm2 = v->pcm[j] + prevCenter; float *p2 = vb->pcm[j] + n1 / 2 - n0 / 2; for (i = 0; i < n0; i++) pcm2[i] = pcm2[i] * w2[n0 - i - 1] + p2[i] * w2[i]; for (; i < n1 / 2 + n0 / 2; i++) pcm2[i] = p2[i]; float *pcm3 = v->pcm[j] + thisCenter; float *p3 = vb->pcm[j] + n; for (i = 0; i < n; i++) pcm3[i] = p3[i]; } }