summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-22 17:55:09 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-22 17:55:09 +0000
commit4747ea36f3c48a30809b5a79bcb5f1a0d93c6e4f (patch)
tree16de05acdeb9434ab27a174defa99c3269e05804
parent34afc46319a3e760e0a037275e1b4df1856d7f4e (diff)
downloadppe42-gcc-4747ea36f3c48a30809b5a79bcb5f1a0d93c6e4f.tar.gz
ppe42-gcc-4747ea36f3c48a30809b5a79bcb5f1a0d93c6e4f.zip
Allow the (scratch) frame pointer to be initialised from the stack pointer
plus a constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38466 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c29
2 files changed, 26 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d1568bb8410..35823fab234 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2000-12-22 Nick Clifton <nickc@redhat.com>
+
+ * dwarf2out_frame_debug_expr: Allow the (scratch) frame
+ pointer to be initialised from the stack pointer plus a
+ constant.
+
2000-12-22 Bernd Schmidt <bernds@redhat.com>
* regrename.c (struct du_chain): New field "earlyclobber".
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 8c6b6ce5a4b..344fe4d1912 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -1355,16 +1355,27 @@ dwarf2out_frame_debug_expr (expr, label)
}
else
{
- if (GET_CODE (src) != PLUS
- || XEXP (src, 1) != stack_pointer_rtx)
+ if (GET_CODE (src) != PLUS)
abort ();
- if (GET_CODE (XEXP (src, 0)) != REG
- || (unsigned) REGNO (XEXP (src, 0)) != cfa_temp_reg)
- abort ();
- if (cfa.reg != STACK_POINTER_REGNUM)
- abort ();
- cfa_store.reg = REGNO (dest);
- cfa_store.offset = cfa.offset - cfa_temp_value;
+
+ if (GET_CODE (XEXP (src, 0)) == REG
+ && REGNO (XEXP (src, 0)) == cfa.reg
+ && GET_CODE (XEXP (src, 1)) == CONST_INT)
+ /* Setting the FP (or a scratch that will be copied into the FP
+ later on) from SP + const. */
+ cfa.reg = REGNO (dest);
+ else
+ {
+ if (XEXP (src, 1) != stack_pointer_rtx)
+ abort ();
+ if (GET_CODE (XEXP (src, 0)) != REG
+ || (unsigned) REGNO (XEXP (src, 0)) != cfa_temp_reg)
+ abort ();
+ if (cfa.reg != STACK_POINTER_REGNUM)
+ abort ();
+ cfa_store.reg = REGNO (dest);
+ cfa_store.offset = cfa.offset - cfa_temp_value;
+ }
}
break;
OpenPOWER on IntegriCloud