[LLVMdev] conditionally reduced intrinsics (llvm.syscall)

Brian R. Gaeke gaeke at uiuc.edu
Sun Aug 22 13:21:02 PDT 2004


Hi,

> Oh, I suppose I should mention what I was working on.  I made a syscall
> intrinsic with codegen for linux/x86.  It seemed a missing peice in
> having a pure llvm compiled userland (mostly, being able to have a full
> bytecode glibc).

This sounds like a good and useful thing.  Are you coordinating
your work with John Criswell?

> Well, the complexity only occurs on x86, other archs are simpler.  Since
> this is not used much outside the c library, I can work around it in the
> library and be satisifed with the simple case.

Architecture-specific calling conventions are typically dealt with
in the various target support libraries (lib/Target/*).

I think what you should do for the X86 codegen is to use the
MachineFrameInfo to build your memory block and add the >6 case
"directly to the codegen", as you say.  I recommend against inserting
MachineInstrs that explicitly manipulate the stack pointer; you are
likely to fall afoul of the PrologEpilogInserter and register
allocator.

-Brian




More information about the llvm-dev mailing list