[llvm-commits] [PATCH] Make X86-64 in the Large model always emit 64-bit calls

Jeffrey Yasskin jyasskin at google.com
Sun Nov 15 21:19:42 PST 2009


On Sun, Nov 15, 2009 at 8:28 PM, Eric Christopher <echristo at apple.com> wrote:
> That said, there's still a problem:  what if someone really does want small code model? Do we want to support that? If so, then we need to have some way of making small code model continue to work on x86-64. I do have an internal customer that we believe needs small code model. Unless the new way has no disadvantages over small?
>

The large code model is slightly slower and bigger than the medium and
small code models, so there is a reason for users to want to pick the
small code model. I haven't tried this, but I think that if a user can
guarantee that their JITMemoryManager allocates all of its code and
data within the constraints of the small code model ("all symbols are
known to be located in the virtual addresses in the range from 0 to
2^31-2^24-1 or from 0x00000000 to 0x7effffff"), setting the code model
to small will Just Work™. In that case, this patch will help by
getting rid of the extraneous far-call-stubs that were being emitted.




More information about the llvm-commits mailing list