public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/59828] New: Broken assembly on ppc* with two -mcpu= options
@ 2014-01-15 14:13 jakub at gcc dot gnu.org
  2014-01-15 14:14 ` [Bug target/59828] " jakub at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-15 14:13 UTC (permalink / raw)
  To: gcc-bugs

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];
    }
}


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-16  9:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-15 14:13 [Bug target/59828] New: Broken assembly on ppc* with two -mcpu= options jakub at gcc dot gnu.org
2014-01-15 14:14 ` [Bug target/59828] " jakub at gcc dot gnu.org
2014-01-16 14:44 ` amodra at gmail dot com
2015-01-28  0:15 ` amodra at gmail dot com
2015-03-08 13:41 ` dje at gcc dot gnu.org
2015-03-08 13:43 ` dje at gcc dot gnu.org
2015-04-22 11:58 ` jakub at gcc dot gnu.org
2015-07-16  9:10 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).