Quoting DJ Delorie <d...@redhat.com>:
m32c.c:m32c_legitimate_address_p allows any rubbish inside a
PRE_MODIFY, as long as the address register is the stack pointer.
OTOH, it does not define any HAVE_*_MODIFY_* macro.
m32c has push/pop and no other pre/post modify
I was talking about what addresses are allowed by
the TARGET_LEGITIMATE_ADDRESS_P, not what the hardware implements or
what the register allocator is guided to produce; some optimizers can
get quite 'creative' in mashing rtl together.
Considering the following stanza from m32c_legitimate_address_p,
I don't see how it would reject
(pre_modify:HI
(reg:CC SP_REGNO)
(cond_exec:V2HI (pc:SC)
(if_then_else:PSI (scratch:BLK) (reg 4004) (return:QI))))
/* allowing PLUS yields mem:HI(plus:SI(mem:SI(plus:SI in m32c_split_move */
if (GET_CODE (x) == PRE_DEC
|| GET_CODE (x) == POST_INC || GET_CODE (x) == PRE_MODIFY)
{
return (GET_CODE (XEXP (x, 0)) == REG
&& REGNO (XEXP (x, 0)) == SP_REGNO);
}