diff options
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 |