diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 796b2080944..86f674efd7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2001-08-29 Kazu Hirata + + * h8300.md (anonymous movhi pattern): Don't move (reg n) to + (mem (pre_dec (reg n)) + (anonymous movsi pattern): Likewise. + 2001-08-29 Kazu Hirata * h8300.h (RETURN_ADDR_RTX): New. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 216524ec070..b8a9b5e0a99 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -175,7 +175,12 @@ (match_operand:HI 1 "general_operand_src" "I,r>,r,i,m,r"))] "TARGET_H8300 && (register_operand (operands[0],HImode) - || register_operand (operands[1], HImode))" + || register_operand (operands[1], HImode)) + && !(GET_CODE (operands[0]) == MEM + && GET_CODE (XEXP (operands[0], 0)) == PRE_DEC + && GET_CODE (XEXP (XEXP (operands[0], 0), 0)) == REG + && GET_CODE (operands[1]) == REG + && REGNO (XEXP (XEXP (operands[0], 0), 0)) == REGNO (operands[1]))" "@ sub.w %T0,%T0 mov.w %T1,%T0 @@ -404,7 +409,12 @@ (match_operand:SI 1 "general_operand_src" "I,r,i,m,r,r,>,I,r,*a"))] "(TARGET_H8300S || TARGET_H8300H) && (register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" + || register_operand (operands[1], SImode)) + && !(GET_CODE (operands[0]) == MEM + && GET_CODE (XEXP (operands[0], 0)) == PRE_DEC + && GET_CODE (XEXP (XEXP (operands[0], 0), 0)) == REG + && GET_CODE (operands[1]) == REG + && REGNO (XEXP (XEXP (operands[0], 0), 0)) == REGNO (operands[1]))" "* { switch (which_alternative)