This is the mail archive of the
mailing list for the GCC project.
Re: [Patch x86/darwin] fix PR51784 'PIC register not correctly preserved...'
- From: Iain Sandoe <iain at codesourcery dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Mike Stump <mikestump at comcast dot net>, Richard Henderson <rth at redhat dot com>
- Date: Thu, 18 Jul 2013 11:12:08 +0100
- Subject: Re: [Patch x86/darwin] fix PR51784 'PIC register not correctly preserved...'
- References: <CAFULd4Z+dQJfKOq-qx2aJt2-6cPjyZ6rmNU0yd47GLyjHbB3SQ at mail dot gmail dot com>
On 18 Jul 2013, at 07:31, Uros Bizjak wrote:
> This should be implemented as an expander. You also won't need
> UNSPEC_NLGR that way.
Now I reload the state from this PR, I recall why this did not work.
in the case:
do stuff that doesn't use the pic reg
call nested function
do stuff that uses the pic register.
+ if (crtl->uses_pic_offset_table)
+ rtx xops;
crtl->uses_pic_offset_table is not set at the point that "nonlocal_label:" is evaluated.
So, I think we have to use the define_insn_and_split, or am I still missing something?