diff options
author | David Edelsohn <edelsohn@gnu.org> | 2004-06-27 15:56:34 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2004-06-27 11:56:34 -0400 |
commit | 60cdabab22144d92f227338dea26bcbc81f93dbc (patch) | |
tree | 48f29909fe85c9a9f107bea3315ccbbe2b60638d /gcc | |
parent | 585539a1e97f752a0c49edd62e9f244700f38f58 (diff) | |
download | gcc-60cdabab22144d92f227338dea26bcbc81f93dbc.zip gcc-60cdabab22144d92f227338dea26bcbc81f93dbc.tar.gz gcc-60cdabab22144d92f227338dea26bcbc81f93dbc.tar.bz2 |
rs6000.c (rs6000_legitimate_offset_address_p): Accept TOC addresses.
* config/rs6000/rs6000.c (rs6000_legitimate_offset_address_p):
Accept TOC addresses.
From-SVN: r83736
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index edfb656..1fe1b43 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-06-27 David Edelsohn <edelsohn@gnu.org> + + * config/rs6000/rs6000.c (rs6000_legitimate_offset_address_p): + Accept TOC addresses. + 2004-06-27 Ulrich Weigand <uweigand@de.ibm.com> * config/s390/s390-protos.h (s390_load_got): Update prototype. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index ac99a17..0aa96b9 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -2625,9 +2625,6 @@ toc_relative_expr_p (rtx op) return constant_pool_expr_1 (op, &have_sym, &have_toc) && have_toc; } -/* SPE offset addressing is limited to 5-bits worth of double words. */ -#define SPE_CONST_OFFSET_OK(x) (((x) & ~0xf8) == 0) - bool legitimate_constant_pool_address_p (rtx x) { @@ -2647,6 +2644,9 @@ legitimate_small_data_p (enum machine_mode mode, rtx x) && small_data_operand (x, mode)); } +/* SPE offset addressing is limited to 5-bits worth of double words. */ +#define SPE_CONST_OFFSET_OK(x) (((x) & ~0xf8) == 0) + bool rs6000_legitimate_offset_address_p (enum machine_mode mode, rtx x, int strict) { @@ -2658,6 +2658,8 @@ rs6000_legitimate_offset_address_p (enum machine_mode mode, rtx x, int strict) return false; if (!INT_REG_OK_FOR_BASE_P (XEXP (x, 0), strict)) return false; + if (legitimate_constant_pool_address_p (x)) + return true; if (GET_CODE (XEXP (x, 1)) != CONST_INT) return false; |