[LLVMbugs] [Bug 3800] New: asm inline : Ran out of registers at -O0
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Mar 13 11:40:35 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=3800
Summary: asm inline : Ran out of registers at -O0
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Register Allocator
AssignedTo: unassignedbugs at nondot.org
ReportedBy: castet.matthieu at free.fr
CC: llvmbugs at cs.uiuc.edu
Hi,
when compiling asm inline at -O0, we can hit easily the "Ran out of registers"
case.
$ cat /tmp/toto.c
#include <stdint.h>
void ff_h264_idct_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride)
{
__asm__ volatile(
"movd %0, %%mm2 \n\t"
"movd %1, %%mm3 \n\t"
"movd %2, %%mm4 \n\t"
"movd %3, %%mm5 \n\t"
"movd %%mm2, %0 \n\t"
"movd %%mm3, %1 \n\t"
"movd %%mm4, %2 \n\t"
"movd %%mm5, %3 \n\t"
:"+m"(*(uint32_t*)(dst+0*stride)),
"+m"(*(uint32_t*)(dst+1*stride)),
"+m"(*(uint32_t*)(dst+2*stride)),
"+m"(*(uint32_t*)(dst+3*stride))
);
}
$ ccc -c -o /tmp/toto.o /tmp/toto.c Ran out of registers
during register allocation! Please check your
inline asm statement for invalid constraints: INLINEASM
<es:movd $0, %mm2
movd $1, %mm3
movd $2, %mm4
movd $3, %mm5
movd %mm2, $0
movd %mm3, $1
movd %mm4, $2
movd %mm5, $3
>, 36, %EDI<kill>, 1, %reg0, 0, 36, %EBX<kill>, 1, %reg0, 0, 36,
%EAX<kill>, 1, %reg0, 0, 36, %EDX<kill>, 1, %reg0, 0, 36, %ECX<kill>, 1, %reg0,
0, 36, %ESI<kill>, 1, %reg0, 0, 36, %EDI<kill>, 1, %reg0, 0, 36,
%reg1070<kill>, 1, %reg0, 0, 14, %EFLAGS<earlyclobber,def,dead>
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list