diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2010-04-15 21:51:14 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2010-04-15 21:51:14 +0000 |
commit | 7140f0f90e92bc0effa66dd178a9fe9c323e7d1f (patch) | |
tree | a42b622f59d1a14c43fa12fecb1726b147ec4061 | |
parent | e3e529d14c8be68ad1aff0c95f5fefd2e8b0a9f3 (diff) | |
download | gcc-7140f0f90e92bc0effa66dd178a9fe9c323e7d1f.zip gcc-7140f0f90e92bc0effa66dd178a9fe9c323e7d1f.tar.gz gcc-7140f0f90e92bc0effa66dd178a9fe9c323e7d1f.tar.bz2 |
re PR target/43741 (sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a)
PR target/43471
* config/sh/sh.c (sh_legitimize_reload_address): Use
MAYBE_BASE_REGISTER_RTX_P instead of BASE_REGISTER_RTX_P.
Remove a unneeded check for offset_base.
From-SVN: r158393
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1c55ca34..5d3da7c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-04-15 Kaz Kojima <kkojima@gcc.gnu.org> + + PR target/43471 + * config/sh/sh.c (sh_legitimize_reload_address): Use + MAYBE_BASE_REGISTER_RTX_P instead of BASE_REGISTER_RTX_P. + Remove a unneeded check for offset_base. + 2010-04-15 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 1849137..5dd9b6e 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -9640,7 +9640,7 @@ sh_legitimize_reload_address (rtx *p, enum machine_mode mode, int opnum, if (GET_CODE (*p) == PLUS && (GET_MODE_SIZE (mode) == 4 || GET_MODE_SIZE (mode) == 8) && CONST_INT_P (XEXP (*p, 1)) - && BASE_REGISTER_RTX_P (XEXP (*p, 0)) + && MAYBE_BASE_REGISTER_RTX_P (XEXP (*p, 0), true) && ! TARGET_SHMEDIA && ! (TARGET_SH4 && mode == DFmode) && ! (mode == PSImode && type == RELOAD_FOR_INPUT_ADDRESS) @@ -9674,8 +9674,7 @@ sh_legitimize_reload_address (rtx *p, enum machine_mode mode, int opnum, /* Sometimes the normal form does not suit DImode. We could avoid that by using smaller ranges, but that would give less optimized code when SImode is prevalent. */ - if (offset_base != 0 - && GET_MODE_SIZE (mode) + offset - offset_base <= 64) + if (GET_MODE_SIZE (mode) + offset - offset_base <= 64) { sum = gen_rtx_PLUS (Pmode, XEXP (*p, 0), GEN_INT (offset_base)); *p = gen_rtx_PLUS (Pmode, sum, GEN_INT (offset - offset_base)); @@ -9689,7 +9688,7 @@ sh_legitimize_reload_address (rtx *p, enum machine_mode mode, int opnum, && (GET_MODE_SIZE (mode) == 4 || GET_MODE_SIZE (mode) == 8) && GET_CODE (XEXP (*p, 0)) == PLUS && CONST_INT_P (XEXP (XEXP (*p, 0), 1)) - && BASE_REGISTER_RTX_P (XEXP (XEXP (*p, 0), 0)) + && MAYBE_BASE_REGISTER_RTX_P (XEXP (XEXP (*p, 0), 0), true) && CONST_INT_P (XEXP (*p, 1)) && ! TARGET_SHMEDIA && ! (TARGET_SH2E && mode == SFmode)) |