m68hc11.md ("bitcmpqi"): Allow memory and soft register for operand 0.

* 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.

From-SVN: r44629
This commit is contained in:
Stephane Carrez 2001-08-04 12:01:02 +02:00 committed by Stephane Carrez
parent 34259cdc2a
commit d8de89e827
2 changed files with 30 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2001-08-04 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* 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 <aj@suse.de>
* gcse.c: Revert Daniel's last patch.

View File

@ -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))