[PATCH] D34245: [PowerPC] Refine the checking for emiting TOC restore nops and Tail-Call eligibility.
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 13 00:26:21 PDT 2017
hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:4273
+ // large TOC to provide all data addressing needs of a module with a
+ // single TOC. Both gold and ld.bfd (since binutils-2.24) will issue a
+ // relocation overflow error when trying to reach more than 2G from the
> sfertile wrote:
> > hfinkel wrote:
> > > What happened before binutils 2.24? 2.24 is only about 3.5 years old.
> > I don't know. I asked what the behavior of the 2 linkers was if the TOC grows larger then the 32 bit offset, as well as checking that 'module' in the abi text meant entire exe and entire shared-object (rather then just a single object file). I assumed that the behavior change in 2.24 was from generic linker error to specific diagnostic rather then add new toc base --> error. I can follow up though to ensure this is the case.
> Before the change in 2.24 if the offset for *_HI and *_HA relocs didn't fit in 32 bits a 4 instruction sequence would be used to build a 64 bit constant. The change added the 32 bit limit and overflow checking to the *_HI and *_HA relocs and added *_HIGH and *_HIGHA relocs to be used if a 64 bit offset may be needed. So even with the old behavior, its still a single TOC base.
Thanks for checking.
More information about the llvm-commits