summaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1996-10-23 22:01:23 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1996-10-23 22:01:23 +0000
commitde0fdb4fb601611abc53c63cfbd3d9e08aab42bb (patch)
tree3719bb68e505390f4d90896ae31094e96f0d09df /gcc/reload.c
parent5eb94d9dda2ce58e9af75d1d1ef38951e92f38fa (diff)
downloadgcc-de0fdb4fb601611abc53c63cfbd3d9e08aab42bb.tar.gz
Accept a unary operator in find_reloads
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13016 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 5f72b14591c..049c3a008b2 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -2533,9 +2533,10 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
ind_levels,
set != 0
&& &SET_DEST (set) == recog_operand_loc[i]);
- else if (code == PLUS)
- /* We can get a PLUS as an "operand" as a result of
- register elimination. See eliminate_regs and gen_reload. */
+ else if (code == PLUS || GET_RTX_CLASS (code) == '1')
+ /* We can get a PLUS as an "operand" as a result of register
+ elimination. See eliminate_regs and gen_reload. We handle
+ a unary operator by reloading the operand. */
substed_operand[i] = recog_operand[i] = *recog_operand_loc[i]
= find_reloads_toplev (recog_operand[i], i, address_type[i],
ind_levels, 0);
@@ -2674,6 +2675,11 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
int constmemok = 0;
int earlyclobber = 0;
+ /* If the predicate accepts a unary operator, it means that
+ we need to reload the operand. */
+ if (GET_RTX_CLASS (GET_CODE (operand)) == '1')
+ operand = XEXP (operand, 0);
+
/* If the operand is a SUBREG, extract
the REG or MEM (or maybe even a constant) within.
(Constants can occur as a result of reg_equiv_constant.) */