[Bug target/88343] [7/8 Regression] R31 is unconditionally saved/restored on powerpc-darwin even when it's not necessary.

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Feb 9 08:49:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88343

--- Comment #32 from Iain Sandoe <iains at gcc dot gnu.org> ---
Thanks for the patches Alan.

Note that 7 and 8 back ports might need this hunk which was applied to trunk
but removed from 7 and 8 when we backed out the change because of breakage
there.

@@ -23970,13 +23974,6 @@ first_reg_to_save (void)
     if (save_reg_p (first_reg))
       break;

-#if TARGET_MACHO
-  if (flag_pic
-      && crtl->uses_pic_offset_table
-      && first_reg > RS6000_PIC_OFFSET_TABLE_REGNUM)
-    return RS6000_PIC_OFFSET_TABLE_REGNUM;
-#endif
-
   return first_reg;
 }


my ppc darwin box is busy with test cycle at present, but I will check 8.2.1
tomorrow with the patch as applied - and also look to see if the hunk above is
needed?


More information about the Gcc-bugs mailing list