diff options
author | Alan Modra <amodra@gcc.gnu.org> | 2005-08-23 12:09:56 +0930 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2005-08-23 12:09:56 +0930 |
commit | 0c380712e71adc4f422634762736c220277772bb (patch) | |
tree | 98588db07a9e8c4055184355eb343c78247a864c /gcc | |
parent | d0515b3965b46f91494494e546d4158f64e4f366 (diff) | |
download | gcc-0c380712e71adc4f422634762736c220277772bb.zip gcc-0c380712e71adc4f422634762736c220277772bb.tar.gz gcc-0c380712e71adc4f422634762736c220277772bb.tar.bz2 |
re PR target/21571 (ICE in rs6000.c with -msdata=default.)
PR target/21571
* config/rs6000/rs6000.c (rs6000_legitimate_small_data_p): Rename
from legitimate_small_data_p, and make global. Update use.
Remove forward declaration.
* config/rs6000/rs6000-protos.h (rs6000_legitimate_small_data_p):
Declare.
* config/rs6000/rs6000.md (movdf_hardfloat32): Allow small data mems.
From-SVN: r103382
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/rs6000-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index 2b117b4..9aa60f0 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -45,6 +45,7 @@ extern void validate_condition_mode (enum rtx_code, enum machine_mode); extern bool legitimate_constant_pool_address_p (rtx); extern bool legitimate_indirect_address_p (rtx, int); extern bool rs6000_legitimate_offset_address_p (enum machine_mode, rtx, int); +extern bool rs6000_legitimate_small_data_p (enum machine_mode, rtx); extern rtx rs6000_got_register (rtx); extern rtx find_addr_reg (rtx); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 2797d5f..edb3d84 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -584,7 +584,6 @@ static unsigned toc_hash_function (const void *); static int toc_hash_eq (const void *, const void *); static int constant_pool_expr_1 (rtx, int *, int *); static bool constant_pool_expr_p (rtx); -static bool legitimate_small_data_p (enum machine_mode, rtx); static bool legitimate_indexed_address_p (rtx, int); static bool legitimate_lo_sum_address_p (enum machine_mode, rtx, int); static struct machine_function * rs6000_init_machine_status (void); @@ -2631,8 +2630,8 @@ legitimate_constant_pool_address_p (rtx x) && constant_pool_expr_p (XEXP (x, 1))); } -static bool -legitimate_small_data_p (enum machine_mode mode, rtx x) +bool +rs6000_legitimate_small_data_p (enum machine_mode mode, rtx x) { return (DEFAULT_ABI == ABI_V4 && !flag_pic && !TARGET_TOC @@ -3401,7 +3400,7 @@ rs6000_legitimate_address (enum machine_mode mode, rtx x, int reg_ok_strict) && TARGET_UPDATE && legitimate_indirect_address_p (XEXP (x, 0), reg_ok_strict)) return 1; - if (legitimate_small_data_p (mode, x)) + if (rs6000_legitimate_small_data_p (mode, x)) return 1; if (legitimate_constant_pool_address_p (x)) return 1; diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index d18b124..84db59f 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -7549,9 +7549,10 @@ if (GET_CODE (operands[1]) == MEM && (rs6000_legitimate_offset_address_p (DFmode, XEXP (operands[1], 0), reload_completed || reload_in_progress) + || rs6000_legitimate_small_data_p (DFmode, XEXP (operands[1], 0)) || GET_CODE (XEXP (operands[1], 0)) == REG || GET_CODE (XEXP (operands[1], 0)) == LO_SUM - || GET_CODE (XEXP (operands[1], 0)) == PRE_INC + || GET_CODE (XEXP (operands[1], 0)) == PRE_INC || GET_CODE (XEXP (operands[1], 0)) == PRE_DEC)) { /* If the low-address word is used in the address, we must load @@ -7591,9 +7592,10 @@ if (GET_CODE (operands[0]) == MEM && (rs6000_legitimate_offset_address_p (DFmode, XEXP (operands[0], 0), reload_completed || reload_in_progress) + || rs6000_legitimate_small_data_p (DFmode, XEXP (operands[0], 0)) || GET_CODE (XEXP (operands[0], 0)) == REG || GET_CODE (XEXP (operands[0], 0)) == LO_SUM - || GET_CODE (XEXP (operands[0], 0)) == PRE_INC + || GET_CODE (XEXP (operands[0], 0)) == PRE_INC || GET_CODE (XEXP (operands[0], 0)) == PRE_DEC)) return \"{st%U0|stw%U0} %1,%0\;{st|stw} %L1,%L0\"; else |