[LLVMdev] how to build eglibc using llvm-gcc without unsupported -fno-toplevel-reorder

Török Edwin edwintorok at gmail.com
Sun Feb 21 13:50:12 PST 2010


On 2010-02-21 23:36, Sergey Yakoushkin wrote:
> Hi, Rafael
> 
> Inlined asm markup inside functions and on the top level is used to
> split asm prologue/epilogue parts in very fine-grained manner.
> So, splitting source c won't give the same result.

You could have 2 files:
 - 1 which contains the function, and a marker where prolog ends
(beginning of file is implicit marker of where it begins)
 - 1 which contains the function, and a marker where epilog begins
(end of file is implicit marker of where it ends)

Or just look at ./sysdeps/x86_64/elf/initfini.c, its a single asm()
block containing all relevant markers, and no C code.
I think thats better than all these hacks to get the asm you want out of
C code.

Best regards,
--Edwin



More information about the llvm-dev mailing list