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,

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:

foo ()
{

 do stuff that doesn't use the pic reg

 call nested function

nonlocal_label:

 do stuff that uses the pic register.

}

+{
+  if (crtl->uses_pic_offset_table)
+    {
+      rtx xops[3];

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?

Thanks
Iain


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