This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/33713] New: [4.3 Regression] can't find a register in class 'GENERAL_REGS' while reloading 'asm'
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2007 15:01:50 -0000
- Subject: [Bug middle-end/33713] New: [4.3 Regression] can't find a register in class 'GENERAL_REGS' while reloading 'asm'
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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