[LLVMdev] x86_64 and large call offsets

Michael Beck mm.beck at gmx.net
Thu Mar 18 12:38:25 PDT 2010


Hi all,

I use a plain LLVM 2.6 to jit code for x86_64. My setup falls into the 
following problem:

The generated code calls some external function whose address is set via 
addGlobalMapping(), but is more than 2GB away from the generated call.
However, a call imm instruction using a 32bit offset is generated, which due 
to wrap around calls the wrong address.
After digging for some time in the LLVM source I could not find code that 
handle this case.

Is there something wrong in my setup? Should I use pre2.7 for this use case?

Thanks in advance,
-- 
Michael Beck 




More information about the llvm-dev mailing list