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

Evan Cheng evan.cheng at apple.com
Thu Nov 12 16:29:11 PST 2009


On Nov 12, 2009, at 2:35 PM, Jeffrey Yasskin wrote:

> On Thu, Nov 12, 2009 at 11:46 AM, Dan Gohman <gohman at apple.com> wrote:
>> In the X86ISelLowering.cpp part, disabling the special handling
>> for GlobalAddresses and ExternalSymbols is fine, but the way the
>> proposed patch does that also happens to disable the
>> "else if (isTailCall)" code immediately below that, which handles
>> indirect tail calls. That code is still needed in the large code
>> model -- the callee needs to be in a specific physical register
>> so that it can survive the epilogue.
>
> Oh, right. New version of the patch at
> http://codereview.appspot.com/154066 /
> http://codereview.appspot.com/download/issue154066_23.diff
>
> On Thu, Nov 12, 2009 at 12:10 PM, Anton Korobeynikov
> <anton at korobeynikov.info> wrote:
>> Also, the check for Is64Bit seems to be redundant - the codemodel
>> setting is valid only in 64 bit mode, thus "large code model" and
>> 32-bit code is undefined :)
>
> Oh! Ok. I don't see that actually enforced anywhere so I replaced the
> check with an assert instead of omitting it entirely.
>
> On Thu, Nov 12, 2009 at 12:58 PM, Evan Cheng <evan.cheng at apple.com>  
> wrote:
>> Looks good. The only comment apart from Dan and Anton's comments is  
>> to
>> force large code model for Darwin x86_64 as well unless explicitly
>> specified otherwise.
>
> That looks like an change in X86TargetMachine::addCodeEmitter()? Am I
> going to break anything if I leave that change to a separate commit?
> Since I don't have a Darwin x86_64 system, I'd rather have one of you
> guys make that change if possible.

Yes. Eric should make that change.

Evan
>
>> Eric, please make sure large code model JIT works on Mac OS X.




More information about the llvm-commits mailing list