Commit dbb138ce by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

re PR target/12598 (Invalid size optimization on volatile memory reference)

	PR target/12598
	* config/cris/cris.md (define_split "*mov_sidesi_biap_mem"+1)
	(define_splits "*mov_sidesi_mem"+1, "casesi"+9, +10, +11, +12):
	Use cris_mem_op and replace_equiv_address, not gen_rtx_MEM.
	("call", "call_value", define_split "*mov_sidesi_mem"+19, +20)
	(define_split "*mov_sidesi_mem"+21, +22, +23, +24, +25, +26, +27)
	(define_split "*mov_sidesi_mem"+28, +29, +30): Use
	replace_equiv_address, not gen_rtx_MEM.
	* config/cris/cris.c (cris_mem_op): New match_operator function.
	* config/cris/cris.h (PREDICATE_CODES): Add cris_mem_op.

From-SVN: r72521
parent c546e185
2003-10-15 Hans-Peter Nilsson <hp@axis.com>
PR target/12598
* config/cris/cris.md (define_split "*mov_sidesi_biap_mem"+1)
(define_splits "*mov_sidesi_mem"+1, "casesi"+9, +10, +11, +12):
Use cris_mem_op and replace_equiv_address, not gen_rtx_MEM.
("call", "call_value", define_split "*mov_sidesi_mem"+19, +20)
(define_split "*mov_sidesi_mem"+21, +22, +23, +24, +25, +26, +27)
(define_split "*mov_sidesi_mem"+28, +29, +30): Use
replace_equiv_address, not gen_rtx_MEM.
* config/cris/cris.c (cris_mem_op): New match_operator function.
* config/cris/cris.h (PREDICATE_CODES): Add cris_mem_op.
2003-10-15 Bernardo Innocenti <bernie@develer.com>
* config/m68k/m68k.h (MASK_SEP_DATA, TARGET_SEP_DATA,
......
......@@ -374,6 +374,19 @@ cris_plus_or_bound_operator (rtx x, enum machine_mode mode)
(GET_MODE (x) == mode && (code == UMIN || code == PLUS));
}
/* Used as an operator to get a handle on a already-known-valid MEM rtx:es
(no need to validate the address), where some address expression parts
have their own match_operand. */
int
cris_mem_op (rtx x, enum machine_mode mode)
{
if (mode == VOIDmode)
mode = GET_MODE (x);
return GET_MODE (x) == mode && GET_CODE (x) == MEM;
}
/* Since with -fPIC, not all symbols are valid PIC symbols or indeed
general_operands, we have to have a predicate that matches it for the
"movsi" expander. */
......@@ -1962,8 +1975,8 @@ cris_notice_update_cc (rtx exp, rtx insn)
value1=rz and value2=[rx] */
cc_status.value1 = XEXP (XVECEXP (exp, 0, 0), 0);
cc_status.value2
= gen_rtx_MEM (GET_MODE (XEXP (XVECEXP (exp, 0, 0), 0)),
XEXP (XVECEXP (exp, 0, 1), 0));
= replace_equiv_address (XEXP (XVECEXP (exp, 0, 0), 1),
XEXP (XVECEXP (exp, 0, 1), 0));
cc_status.flags = 0;
/* Huh? A side-effect cannot change the destination
......
......@@ -1613,6 +1613,8 @@ call_ ## FUNC (void) \
{ZERO_EXTEND, SIGN_EXTEND}}, \
{"cris_plus_or_bound_operator", \
{PLUS, UMIN}}, \
{"cris_mem_op", \
{MEM}}, \
{"cris_bdap_operand", \
{SUBREG, REG, LABEL_REF, SYMBOL_REF, MEM, CONST_INT, \
CONST_DOUBLE, CONST, SIGN_EXTEND}}, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment