[LLVMdev] How to force stack alignment for particular target triple in JIT?

Yuri yuri at rawbw.com
Sun Feb 20 21:16:56 PST 2011


I get SEGV in gcc-compiled procedure in Solaris10-i386. This procedure 
is called from llvm JIT code.
Exact instruction that crashes is this: movdqa %xmm0, 0x10(%esp)
%esp is 8-aligned, and by definition of movdqa it expects 16-aligned stack.
This leads me to believe that llvm uses wrong ABI when calling external 
procedures and doesn't align stack properly.

llvm module executing in JIT has this target triple: i386-pc-solaris2.10

Isn't target triple supposed to set correct ABI including stack 
alignment? How to set the correct alignment for this triple?

Yuri



More information about the llvm-dev mailing list