summaryrefslogtreecommitdiffstats
path: root/gcc/reload.c
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-14 18:32:04 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-14 18:32:04 +0000
commitb3c5ca3ecde15d6272bfe330ef86366bd621427c (patch)
tree0c4c2b3cfe155b28ab774d52e64484b7007ac262 /gcc/reload.c
parente9b763a8112c959d7a7e9dbecca6adb08233609e (diff)
downloadppe42-gcc-b3c5ca3ecde15d6272bfe330ef86366bd621427c.tar.gz
ppe42-gcc-b3c5ca3ecde15d6272bfe330ef86366bd621427c.zip
* reload.c (find_reloads): When reloading a PLUS with constant
operand, make sure the constant is pushed to the constant pool if required. * config/s390/s390.c (s390_secondary_input_reload_class): Remove reload bug workaround. (s390_expand_plus_operand): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89047 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index f6a008d957d..66894dc1db7 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -3778,6 +3778,27 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
goal_alternative_win[i] = 1;
}
+ /* Likewise any invalid constants appearing as operand of a PLUS
+ that is to be reloaded. */
+ for (i = 0; i < noperands; i++)
+ if (! goal_alternative_win[i]
+ && GET_CODE (recog_data.operand[i]) == PLUS
+ && CONST_POOL_OK_P (XEXP (recog_data.operand[i], 1))
+ && (PREFERRED_RELOAD_CLASS (XEXP (recog_data.operand[i], 1),
+ (enum reg_class) goal_alternative[i])
+ == NO_REGS)
+ && operand_mode[i] != VOIDmode)
+ {
+ rtx tem = force_const_mem (operand_mode[i],
+ XEXP (recog_data.operand[i], 1));
+ tem = gen_rtx_PLUS (operand_mode[i],
+ XEXP (recog_data.operand[i], 0), tem);
+
+ substed_operand[i] = recog_data.operand[i]
+ = find_reloads_toplev (tem, i, address_type[i],
+ ind_levels, 0, insn, NULL);
+ }
+
/* Record the values of the earlyclobber operands for the caller. */
if (goal_earlyclobber)
for (i = 0; i < noperands; i++)
OpenPOWER on IntegriCloud