]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dwarf2out.c (dbx_reg_number): Do leaf register remapping only if the function is...
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 23 Dec 2006 17:18:38 +0000 (17:18 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 23 Dec 2006 17:18:38 +0000 (17:18 +0000)
* dwarf2out.c (dbx_reg_number): Do leaf register remapping
only if the function is leaf.
(multiple_reg_loc_descriptor): Likewise.

From-SVN: r120170

gcc/ChangeLog
gcc/dwarf2out.c

index 56ca96d68609297948f11a045a00b16c0feffe9d..91255aac91fcecb704403bddf6f5e444e4094745 100644 (file)
@@ -1,3 +1,9 @@
+2006-12-23  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * dwarf2out.c (dbx_reg_number): Do leaf register remapping
+       only if the function is leaf.
+       (multiple_reg_loc_descriptor): Likewise.
+
 2006-12-23  Kazu Hirata  <kazu@codesourcery.com>
 
        * rtl.h (NOTE_EXPECTED_VALUE): Remove.
index a9f6308a934031507b04948ec5e7506ac971b585..54e2c3342a2fecec5ef89b422def323fe0542778 100644 (file)
@@ -8611,13 +8611,12 @@ dbx_reg_number (rtx rtl)
   gcc_assert (regno < FIRST_PSEUDO_REGISTER);
 
 #ifdef LEAF_REG_REMAP
-  {
-    int leaf_reg;
-
-    leaf_reg = LEAF_REG_REMAP (regno);
-    if (leaf_reg != -1)
-      regno = (unsigned) leaf_reg;
-  }
+  if (current_function_uses_only_leaf_regs)
+    {
+      int leaf_reg = LEAF_REG_REMAP (regno);
+      if (leaf_reg != -1)
+       regno = (unsigned) leaf_reg;
+    }
 #endif
 
   return DBX_REGISTER_NUMBER (regno);
@@ -8686,13 +8685,12 @@ multiple_reg_loc_descriptor (rtx rtl, rtx regs)
 
   reg = REGNO (rtl);
 #ifdef LEAF_REG_REMAP
-  {
-    int leaf_reg;
-
-    leaf_reg = LEAF_REG_REMAP (reg);
-    if (leaf_reg != -1)
-      reg = (unsigned) leaf_reg;
-  }
+  if (current_function_uses_only_leaf_regs)
+    {
+      int leaf_reg = LEAF_REG_REMAP (reg);
+      if (leaf_reg != -1)
+       reg = (unsigned) leaf_reg;
+    }
 #endif
   gcc_assert ((unsigned) DBX_REGISTER_NUMBER (reg) == dbx_reg_number (rtl));
   nregs = hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)];