]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
m68k.c (output_function_prologue): Add pic register to mask if live and flag_pic.
authorRichard Henderson <rth@cygnus.com>
Thu, 8 Jul 1999 13:20:37 +0000 (07:20 -0600)
committerJeff Law <law@gcc.gnu.org>
Thu, 8 Jul 1999 13:20:37 +0000 (07:20 -0600)

        * m68k.c (output_function_prologue): Add pic register to mask
        if live and flag_pic.
        (output_function_epilogue): Likewise.

From-SVN: r28021

gcc/config/m68k/m68k.c

index 2eef7123c8ff4b42da219c722d89c140cbd4274b..4053b3a435d668fce47e0fa2f8a6e38f1255d142 100644 (file)
@@ -356,6 +356,11 @@ output_function_prologue (stream, size)
       mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM));
       num_saved_regs--;
     }
+  if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+    {
+      mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
+      num_saved_regs++;
+    }
 
 #if NEED_PROBE
 #ifdef MOTOROLA
@@ -563,6 +568,11 @@ output_function_epilogue (stream, size)
         nregs++;
        mask |= 1 << regno;
       }
+  if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
+    {
+      nregs++;
+      mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
+    }
   offset = foffset + nregs * 4;
   /* FIXME : leaf_function_p below is too strong.
      What we really need to know there is if there could be pending