This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch x86/darwin] fix PR51784 'PIC register not correctly preserved...'


Hi Uros,

(working on a re-vamp with an expander for the nonlocal goto MD).

On 18 Jul 2013, at 08:26, Uros Bizjak wrote:


> Under assumpiton that foo and bar doesn't share the same GOT, you will
> see that g42 after the label is accessed with "clobbered" %ebx.

My understanding is that foo and bar *have* have to share the same GOT (since they must be in the same object).

It is only foo and its caller that would have different GOTs.

---

Note, however, that IFF EBX might be used in foo() for some other purpose (i.e. such that its value is not the GOT and needs to be preserved across the call to bar()) then we have a more general problem - i.e. that x86 needs some general way to restore ebx at the site of a non-local-goto-reciever.  I don't think it works to restore ebx inside bar() since the goto might not be to bar()'s caller.

e.g. in Jakub's example in the PR.

thanks
Iain


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]