pa.c (hppa_save_pic_table_rtx): New variable.
authorJeff Law <law@gcc.gnu.org>
Sun, 3 Jan 1993 18:59:12 +0000 (11:59 -0700)
committerJeff Law <law@gcc.gnu.org>
Sun, 3 Jan 1993 18:59:12 +0000 (11:59 -0700)
* pa.c (hppa_save_pic_table_rtx): New variable.
(finalize_pic): Setup hppa_save_pic_table_rtx..

From-SVN: r3068

gcc/config/pa/pa.c

index ab7b21885314f3e4b3b8c2a195a43e2f158d3537..2e36846cce2bc36b91afc76fee553910dbc3a228 100644 (file)
@@ -41,6 +41,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 rtx hppa_compare_op0, hppa_compare_op1;
 enum cmp_type hppa_branch_type;
 
+rtx hppa_save_pic_table_rtx;
+
 /* Set by the FUNCTION_PROFILER macro. */
 int hp_profile_labelno;
 
@@ -492,9 +494,18 @@ initialize_pic ()
 void
 finalize_pic ()
 {
-  /* Need to emit this whether or not we obey regdecls,
-     since setjmp/longjmp can cause life info to screw up.  */
+  if (hppa_save_pic_table_rtx)
+    {
+      emit_insn_after (gen_rtx (SET, VOIDmode,
+                               hppa_save_pic_table_rtx,
+                               gen_rtx (REG, Pmode, 19)),
+                      get_insns ());
+      /* Need to emit this whether or not we obey regdecls,
+        since setjmp/longjmp can cause life info to screw up.  */
+      hppa_save_pic_table_rtx = 0;
+    }
   emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
+
 }
 
 /* For the HPPA, REG and REG+CONST is cost 0