[LLVMdev] Code generation issues

Chris Lattner sabre at nondot.org
Tue May 29 21:31:15 PDT 2007


On Tue, 29 May 2007, Bram Adams wrote:
> Today I managed to link ioquake3, but generating a binary does not
> work yet.
> 1) On OSX, I get:
>
> Error: Code generator does not support intrinsic function
> 'llvm.ppc.altivec.lvsl'!
>
> when I do:  llc file.bc -march=c -o file.c

The C backend doesn't support all target-specific intrinsics.

> 2) On Linux X86, llc does not give any problem, but I get this while
> compiling the generated .c file:
>
> error: unknown register name 'S' in 'asm'
>
> This is the offending line (notice the "S" on the last line):
>
>   __asm__ volatile ("\tpushal\t\t\t\t\n\tmovl %0,%%esi\t\t\n\tmovl %
> 1,%%edi\t\t\n\tcall *%2\t\t\t\n\tmovl %%esi,%0\t\t\n\tmo\
> vl %%edi,%1\t\t\n\tpopal\t\t\t\t\n"
>         :"=m"(memProgramStack_2E_5872),"=m"(memOpStack_2E_5873)
>         :"m"(memEntryPoint_2E_5874),"m"(memProgramStack_2E_5872),"m"(me
> mOpStack_2E_5873)
>         :"D","S");
>
> Apparently, leaving out "S" helps (compiling the .c file works), but
> what does it do and why is it here?

Please file a bug with this in a self-contained .c file.  Thanks!

> 3) Regarding bug 1446 (http://llvm.org/bugs/show_bug.cgi?id=1446):
> the proposed patch for the file called sv_client.c indeed works on
> OSX, but on Linux X86 -O3 it still does not work. More in particular,
> the frontend is now stuck inside the for-loop on lines 176-->391 of
> PromoteMemoryToRegister.cpp when in the control flow of -scalarrepl:

Very strange.  Is everything up to date?

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list