mn10300: Better definition of INCOMING_RETURN_ADDR_RTX.
authorRichard Henderson <rth@redhat.com>
Tue, 11 Jan 2011 18:11:07 +0000 (10:11 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 11 Jan 2011 18:11:07 +0000 (10:11 -0800)
The new definition is more useful to the unwinder.

From-SVN: r168668

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

index 7c42fabc95035463fb6e660433326c258c90c1b6..515038df068fcadbe10432baf3ccae825503f1d5 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 67516b6ebe4ec816609782436909ab66245aeacb..edc17f594daec1d95deb63cf856430c7a60d22ee 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.  */