Patchwork [01/28] mn10300: Better definition of INCOMING_RETURN_ADDR_RTX.

login
register
mail settings
Submitter Richard Henderson
Date Jan. 10, 2011, 8:31 p.m.
Message ID <1294691517-19580-2-git-send-email-rth@redhat.com>
Download mbox | patch
Permalink /patch/78199/
State New
Headers show

Comments

Richard Henderson - Jan. 10, 2011, 8:31 p.m.
From: Richard Henderson <rth@twiddle.net>

The new definition is more useful to the unwinder.
---
 gcc/config/mn10300/mn10300.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Jeff Law - Jan. 11, 2011, 2:43 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/10/11 13:31, Richard Henderson wrote:
> From: Richard Henderson <rth@twiddle.net>
> 
> The new definition is more useful to the unwinder.
> ---
>  gcc/config/mn10300/mn10300.h |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
> index 67516b6..edc17f5 100644
> --- a/gcc/config/mn10300/mn10300.h
> +++ b/gcc/config/mn10300/mn10300.h
> @@ -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))
>  
>  /* Maximum number of registers that can appear in a valid memory address.  */
>  
Seems reasonable.

Jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNLGyCAAoJEBRtltQi2kC7kN4H/2uZItrFa8y8tG80dtmlwcUs
jib9TXFH/KFH0ZPmC5Vg6xPinmAbs3LgGpVpxsqIn4Pa8bWECC7IelKTrp/xBz14
KGLb85UIeDp7KRiROR0Ym4KL84fDSFIx2ecefK8MdoIloJRk+xk9ky3vIoNWuHVV
4ghPOyFVpPSJ5HYREaKJ8BRDmgBhWm9w9RJ/HZeYkgz7PfdaXgY8CnGMTAFoclcP
AudmZekYI65PwQ4n7PKByQ4eoErvY/Se0pKJ1BP2jJO5+jPeEBWJAq1rStdTanrl
jmCzwedmvOAlm4HHY8RcxNQvE+PUKUQeQ0Td6RG3buthtRHW/UtsV+UwqjAdDns=
=Yf48
-----END PGP SIGNATURE-----

Patch

diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index 67516b6..edc17f5 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -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))
 
 /* Maximum number of registers that can appear in a valid memory address.  */