iris6.h (DWARF_FRAME_RETURN_COLUMN): Redefine to match what the system unwinder expects.
authorOlivier Hainque <hainque@adacore.com>
Tue, 5 Apr 2005 09:36:06 +0000 (09:36 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Tue, 5 Apr 2005 09:36:06 +0000 (09:36 +0000)
* config/mips/iris6.h (DWARF_FRAME_RETURN_COLUMN): Redefine to
match what the system unwinder expects.
* config/mips/mips.c (mips_frame_set): If we're saving the return
address register and the dwarf return address column number differs
from the hard register number, adjust the note reg to refer to the
former.

From-SVN: r97617

gcc/ChangeLog
gcc/config/mips/iris6.h
gcc/config/mips/mips.c

index d97b44096e1b9d0755da96b910d9545de09d97f1..0fac52c8ff69ebe45e79a1322717c3c849f03228 100644 (file)
@@ -1,3 +1,12 @@
+2005-04-05  Olivier Hainque  <hainque@adacore.com>
+       
+       * config/mips/iris6.h (DWARF_FRAME_RETURN_COLUMN): Redefine to
+       match what the system unwinder expects.
+       * config/mips/mips.c (mips_frame_set): If we're saving the return
+       address register and the dwarf return address column number differs
+       from the hard register number, adjust the note reg to refer to the
+       former.
+
 2004-04-05  Richard Sandiford  <rsandifo@redhat.com>
 
        * config/mn10300/mn10300-protos.h (mn10300_override_options): Declare.
index ff051255c9c6982e9d24d7adfa84bab93b0cda4f..b64d371b8f344e85057539272c40646ff8b30915 100644 (file)
@@ -38,6 +38,11 @@ Boston, MA 02111-1307, USA.  */
    compiling -g.  This guarantees that we can unwind the stack.  */
 #define DWARF2_FRAME_INFO 1
 
+/* The system unwinder in libexc requires a specific dwarf return address
+   column to work.  */
+#undef  DWARF_FRAME_RETURN_COLUMN
+#define DWARF_FRAME_RETURN_COLUMN (FP_REG_LAST + 1)
+
 #undef MACHINE_TYPE
 #define MACHINE_TYPE "SGI running IRIX 6.x"
 
index 30b14c54ba63e6e856003a3daf4067cef816672f..0a82ce1067d482b2aefcbfc60a4bf52123d80cc4 100644 (file)
@@ -6276,8 +6276,18 @@ mips_set_frame_expr (rtx frame_pattern)
 static rtx
 mips_frame_set (rtx mem, rtx reg)
 {
-  rtx set = gen_rtx_SET (VOIDmode, mem, reg);
+  rtx set;
+
+  /* If we're saving the return address register and the dwarf return
+     address column differs from the hard register number, adjust the
+     note reg to refer to the former.  */
+  if (REGNO (reg) == GP_REG_FIRST + 31
+      && DWARF_FRAME_RETURN_COLUMN != GP_REG_FIRST + 31)
+    reg = gen_rtx_REG (GET_MODE (reg), DWARF_FRAME_RETURN_COLUMN);
+
+  set = gen_rtx_SET (VOIDmode, mem, reg);
   RTX_FRAME_RELATED_P (set) = 1;
+
   return set;
 }