[llvm-commits] [llvm] r67142 - in /llvm/trunk: lib/Target/X86/X86Instr64bit.td test/CodeGen/X86/call-imm.ll

Evan Cheng evan.cheng at apple.com
Tue Mar 17 19:36:54 PDT 2009


On Mar 17, 2009, at 7:17 PM, Chris Lattner wrote:

>
> On Mar 17, 2009, at 7:03 PM, Evan Cheng wrote:
>
>> llvm only supports small code model fully. Medium and large code
>> models are not fully baked. Perhaps this just need a
>> Require<[SmallCode]>. It's true the call destination displacement can
>> be beyond 4G. But in small code model that's undefined behavior
>> anyway, right?
>
> Why does "call <some random address>" imply that the address is in the
> text segment?  I don't see what mcmodel has to do with this, nor do I

No it doesn't. But how would that work?

>
> understand why the optimization is that important.  If we cared a lot

It's not.

Evan

>
> about this for the JIT, then the client of the JIT should output an
> llvm::Function prototype object, then use EE->addGlobalMapping to set
> its address to the desired location.
>
> -Chris
>
>>
>>
>> Evan
>>
>> On Mar 17, 2009, at 6:31 PM, Mike Stump wrote:
>>
>>> On Mar 17, 2009, at 5:43 PM, Chris Lattner wrote:
>>>> Disable the "call to immediate" optimization on x86-64.
>>>
>>> I think it would be valid for any model other than -mcmodel=large,  
>>> if
>>> people wanted to have -mcmodel support.
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list