public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/33713]  New: [4.3 Regression] can't find a register in class 'GENERAL_REGS' while reloading 'asm'
@ 2007-10-09 15:02 rguenth at gcc dot gnu dot org
  2007-10-09 16:50 ` [Bug middle-end/33713] " matz at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-09 15:02 UTC (permalink / raw)
  To: gcc-bugs

libtheora has

typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int16_t ogg_int16_t;
void oc_frag_recon_inter2_mmx(unsigned char *_dst,int _dst_ystride,
 const unsigned char *_src1,int _src1_ystride,const unsigned char *_src2,
 int _src2_ystride,const ogg_int16_t *_residue)
{
  long a;
  int i;
  __asm__ __volatile__(
    "pxor %%mm0,%%mm0\n\t"
    "movq (%[src1]),%%mm2\n\t"
    :[src1]"+r"(_src1)
    :
  );
  for(i=8;i-->0;){
    __asm__ __volatile__(
     "movq (%[src2]),%%mm4\n\t"
     "movq %%mm2,%%mm3\n\t"
     "movq %%mm4,%%mm5\n\t"
     "mov %[src1_ystride],%[a]\n\t"
     "punpcklbw %%mm0,%%mm2\n\t"
     "punpcklbw %%mm0,%%mm4\n\t"
     "lea (%[src1],%[a]),%[src1]\n\t"
     "punpckhbw %%mm0,%%mm3\n\t"
     "punpckhbw %%mm0,%%mm5\n\t"
     "mov %[src2_ystride],%[a]\n\t"
     "paddsw %%mm2,%%mm4\n\t"
     "paddsw %%mm3,%%mm5\n\t"
     "lea (%[src2],%[a]),%[src2]\n\t"
     "movq (%[src1]),%%mm2\n\t"
     "psrlw $1,%%mm4\n\t"
     "psrlw $1,%%mm5\n\t"
     "paddsw (%[residue]),%%mm4\n\t"
     "paddsw 8(%[residue]),%%mm5\n\t"
     "mov %[dst_ystride],%[a]\n\t"
     "packuswb %%mm5,%%mm4\n\t"
     "lea 0x10(%[residue]),%[residue]\n\t"
     "movq %%mm4,(%[dst])\n\t"
     "lea (%[dst],%[a]),%[dst]\n\t"
     :[a]"=&a"(a),[dst]"+r"(_dst),[residue]"+r"(_residue),
      [src1]"+r"(_src1),[src2]"+r"(_src2)
     :[dst_ystride]"m"((long)_dst_ystride),
      [src1_ystride]"m"((long)_src1_ystride),
      [src2_ystride]"m"((long)_src2_ystride)
     :"memory"
   );
  }
}

which gets both asms rejected with trunk (r129166) but are accepted with 4.2:

./cc1 -fpreprocessed mmxfrag.i -quiet -march=i586 -mtune=i686 -O -version
-fforce-addr -fomit-frame-pointer -fPIC -o /dev/null -m32
mmxfrag.i: In function 'oc_frag_recon_inter2_mmx':
mmxfrag.i:16: error: can't find a register in class 'GENERAL_REGS' while
reloading 'asm'
mmxfrag.i:9: error: 'asm' operand has impossible constraints
mmxfrag.i:16: error: 'asm' operand has impossible constraints

note both -fforce-addr and -fPIC are necessary to produce the problem.


-- 
           Summary: [4.3 Regression] can't find a register in class
                    'GENERAL_REGS' while reloading 'asm'
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
GCC target triplet: i?86-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33713


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

end of thread, other threads:[~2007-12-03 23:22 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-09 15:02 [Bug middle-end/33713] New: [4.3 Regression] can't find a register in class 'GENERAL_REGS' while reloading 'asm' rguenth at gcc dot gnu dot org
2007-10-09 16:50 ` [Bug middle-end/33713] " matz at gcc dot gnu dot org
2007-10-09 17:41 ` matz at gcc dot gnu dot org
2007-10-10  6:44 ` bonzini at gnu dot org
2007-10-22  8:36 ` pinskia at gcc dot gnu dot org
2007-10-22  8:49 ` rguenth at gcc dot gnu dot org
2007-11-05  2:47 ` mmitchel at gcc dot gnu dot org
2007-11-06 17:06 ` bonzini at gnu dot org
2007-11-06 21:38 ` rguenther at suse dot de
2007-11-07 16:46 ` matz at gcc dot gnu dot org
2007-11-07 18:56 ` ubizjak at gmail dot com
2007-11-08 16:32 ` paolo dot bonzini at lu dot unisi dot ch
2007-11-08 19:56 ` bonzini at gnu dot org
2007-11-08 19:58 ` bonzini at gnu dot org
2007-11-10 10:46 ` steven at gcc dot gnu dot org
2007-11-10 13:04 ` bonzini at gnu dot org
2007-11-19  8:54 ` steven at gcc dot gnu dot org
2007-11-19  9:45 ` bonzini at gnu dot org
2007-11-29 11:56 ` aldyh at gcc dot gnu dot org
2007-12-03 23:22 ` aldyh at gcc dot gnu dot 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).