Fix register renaming problem
authorBernd Schmidt <bernds@redhat.com>
Thu, 1 Mar 2001 14:04:23 +0000 (14:04 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Thu, 1 Mar 2001 14:04:23 +0000 (14:04 +0000)
From-SVN: r40152

gcc/ChangeLog
gcc/config/ia64/ia64.c

index 879827b9f163142199816193c2151edf644bdd30..0ca9c9b1a434ba775388ee638ba6076baddad105 100644 (file)
@@ -1,5 +1,8 @@
 2001-03-01  Bernd Schmidt  <bernds@redhat.com>
 
+       * config/ia64/ia64.c (ia64_hard_regno_rename_ok): Disallow renaming
+       from reg 4 if current_function_calls_setjmp.
+
        * reload1.c (eliminate_regs_in_insn): Restrict the special case
        code not to try to optimize adds with anything but a REG destination.
 
index 1a4baa02c6c9b72278443064d73d2efd8aee135c..bfe0d551dadcacdd0726f56bc1b26fbeae18ce2c 100644 (file)
@@ -2436,6 +2436,10 @@ ia64_hard_regno_rename_ok (from, to)
   if (PR_REGNO_P (from) && PR_REGNO_P (to))
     return (from & 1) == (to & 1);
 
+  /* Reg 4 contains the saved gp; we can't reliably rename this.  */
+  if (from == GR_REG (4) && current_function_calls_setjmp)
+    return 0;
+
   return 1;
 }