diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 92bf8d4fee6..8a77fa0b7e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-08-04 Stephane Carrez + + * config/m68hc11/m68hc11.md ("bitcmpqi"): Allow memory and soft + register for operand 0. + ("bitcmpqi_z_used"): Allow memory for operand 0. + (split "bitcmpqi"): New split to handle address reg as operand 1. + 2001-08-04 Andreas Jaeger * gcse.c: Revert Daniel's last patch. diff --git a/gcc/config/m68hc11/m68hc11.md b/gcc/config/m68hc11/m68hc11.md index 8392c2c491e..c87a2188d0e 100644 --- a/gcc/config/m68hc11/m68hc11.md +++ b/gcc/config/m68hc11/m68hc11.md @@ -385,28 +385,41 @@ (define_insn "bitcmpqi" [(set (cc0) - (and:QI (match_operand:QI 0 "tst_operand" "d,d,d") - (match_operand:QI 1 "cmp_operand" "im,*A,u")))] + (and:QI (match_operand:QI 0 "tst_operand" "d,d,d,m,!u") + (match_operand:QI 1 "cmp_operand" "im,*B,u,d,d")))] "" "@ - bitb\\t%1 + bitb\\t%b1 # - bitb\\t%1") + bitb\\t%b1 + bitb\\t%b0 + bitb\\t%b0") + +(define_split /* "bitcmpqi" */ + [(set (cc0) + (and:QI (match_operand:QI 0 "tst_operand" "d") + (match_operand:QI 1 "hard_addr_reg_operand" "xy")))] + "z_replacement_completed == 2 && GET_MODE (operands[0]) == QImode" + [(set (match_dup 3) (match_dup 2)) + (set (cc0) (and:QI (match_dup 0) (match_dup 4)))] + "operands[2] = gen_rtx (REG, HImode, REGNO (operands[1])); + operands[3] = gen_rtx (REG, HImode, SOFT_TMP_REGNUM); + operands[4] = gen_rtx (REG, QImode, SOFT_TMP_REGNUM);") (define_insn "bitcmpqi_z_used" [(set (cc0) - (and:QI (match_operand:QI 0 "tst_operand" "d") - (match_operand:QI 1 "cmp_operand" "m"))) - (use (match_operand:HI 2 "hard_reg_operand" "xy")) + (and:QI (match_operand:QI 0 "tst_operand" "d,m") + (match_operand:QI 1 "cmp_operand" "m,d"))) + (use (match_operand:HI 2 "hard_reg_operand" "xy,xy")) (use (reg:HI 11))] "" "#") (define_split /* "bitcmpqi_z_used" */ [(set (cc0) - (and:QI (match_operand:QI 0 "tst_operand" "d") - (match_operand:QI 1 "cmp_operand" "m"))) - (use (match_operand:HI 2 "hard_reg_operand" "xy")) + (and:QI (match_operand:QI 0 "tst_operand" "d,m") + (match_operand:QI 1 "cmp_operand" "m,d"))) + (use (match_operand:HI 2 "hard_reg_operand" "xy,xy")) (use (reg:HI 11))] "z_replacement_completed == 2" [(set (mem:HI (pre_dec:HI (reg:HI 3))) (match_dup 2))