]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
global.c (find_reg): Mark the eh regs as used if necessary.
authorAndreas Krebbel <krebbel1@de.ibm.com>
Thu, 17 Jan 2008 16:18:59 +0000 (16:18 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Thu, 17 Jan 2008 16:18:59 +0000 (16:18 +0000)
2008-01-17  Andreas Krebbel  <krebbel1@de.ibm.com>

* global.c (find_reg): Mark the eh regs as used if necessary.
* ra-conflict.c (global_conflicts): Set no_eh_reg flag.
* ra.h (struct allocno): no_eh_reg field added.  Changed
no_stack_reg type to bitfield.

From-SVN: r131601

gcc/ChangeLog
gcc/global.c
gcc/ra-conflict.c
gcc/ra.h

index 572b6edab601a16e4bced3fa784b70f565e24a05..c337e95a9c5aa610f97e14c8b06db1c4007c3e39 100644 (file)
@@ -1,3 +1,10 @@
+2008-01-17  Andreas Krebbel  <krebbel1@de.ibm.com>
+
+       * global.c (find_reg): Mark the eh regs as used if necessary.
+       * ra-conflict.c (global_conflicts): Set no_eh_reg flag.
+       * ra.h (struct allocno): no_eh_reg field added.  Changed
+       no_stack_reg type to bitfield.
+
 2008-01-17  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree.c (substitute_in_expr): Add missing 'break'.
index 8be113df60a39468b7ebf094ac5806f54e73636a..c805f572c7fe49d503f96517f2a9c3ef5d5f1e6f 100644 (file)
@@ -1011,6 +1011,16 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere
     IOR_HARD_REG_SET (used1, losers);
 
   IOR_COMPL_HARD_REG_SET (used1, reg_class_contents[(int) class]);
+
+#ifdef EH_RETURN_DATA_REGNO
+  if (allocno[num].no_eh_reg)
+    {
+      unsigned int j;
+      for (j = 0; EH_RETURN_DATA_REGNO (j) != INVALID_REGNUM; j++)
+       SET_HARD_REG_BIT (used1, EH_RETURN_DATA_REGNO (j));
+    }
+#endif
+
   COPY_HARD_REG_SET (used2, used1);
 
   IOR_HARD_REG_SET (used1, allocno[num].hard_reg_conflicts);
index bc93b8918173184f56ffe6dd13807b8478d22302..ce1dfdfcfb7782f24d394c29fc8decf8afbce97e 100644 (file)
@@ -1184,6 +1184,11 @@ global_conflicts (void)
                break;
              record_one_conflict (allocnos_live, &hard_regs_live, regno);
            }
+
+         EXECUTE_IF_SET_IN_SPARSESET (allocnos_live, i)
+           {
+             allocno[i].no_eh_reg = 1;
+           }
        }
 #endif
 
index 4081df347cadb42cdbbfedd2b8f58642444800cb..c7e12a7b0c5f0d72877c1d3272ca1e10308afcd8 100644 (file)
--- a/gcc/ra.h
+++ b/gcc/ra.h
@@ -75,9 +75,14 @@ struct allocno
 
   HARD_REG_SET regs_someone_prefers;
 
+#ifdef EH_RETURN_DATA_REGNO
+  /* Set to true if allocno can't be allocated in an eh register.  */
+  unsigned int no_eh_reg:1;
+#endif
+
 #ifdef STACK_REGS
   /* Set to true if allocno can't be allocated in the stack register.  */
-  bool no_stack_reg;
+  unsigned int no_stack_reg:1;
 #endif
 };
 extern struct allocno *allocno;