OSDN Git Service

mn10300: Better definition of INCOMING_RETURN_ADDR_RTX.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Jan 2011 18:11:07 +0000 (18:11 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Jan 2011 18:11:07 +0000 (18:11 +0000)
The new definition is more useful to the unwinder.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168668 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mn10300/mn10300.h

index 7c42fab..515038d 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-11  Richard Henderson  <rth@redhat.com>
+
+       * config/mn10300/mn10300.h (INCOMING_RETURN_ADDR_RTX): Define
+       in terms of the value on the stack, not the MDR register.
+
 2011-01-11  Jan Hubicka  <jh@suse.cz>
 
        PR lto/45721
index 67516b6..edc17f5 100644 (file)
@@ -548,7 +548,10 @@ struct cum_arg
    ? gen_rtx_MEM (Pmode, arg_pointer_rtx) \
    : (rtx) 0)
 
-#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, MDR_REGNUM)
+/* The return address is saved both in the stack and in MDR.  Using
+   the stack location is handiest for what unwinding needs.  */
+#define INCOMING_RETURN_ADDR_RTX \
+  gen_rtx_MEM (VOIDmode, gen_rtx_REG (VOIDmode, STACK_POINTER_REGNUM))
 \f
 /* Maximum number of registers that can appear in a valid memory address.  */