Commit 09214424 by Stephane Carrez Committed by Stephane Carrez

m68hc11.md (SOFT_Z_REGNUM): New constant.

	* config/m68hc11/m68hc11.md (SOFT_Z_REGNUM): New constant.
	("tstqi_z_used" split): Use it.
	("cmphi_z_used"): Likewise.
	("bitcmpqi_z_used"): Likewise; also use SP_REGNUM constant.
	("cmpqi_z_used"): Likewise.

From-SVN: r65522
parent 355b81d5
2003-04-12 Stephane Carrez <stcarrez@nerim.fr>
* config/m68hc11/m68hc11.md (SOFT_Z_REGNUM): New constant.
("tstqi_z_used" split): Use it.
("cmphi_z_used"): Likewise.
("bitcmpqi_z_used"): Likewise; also use SP_REGNUM constant.
("cmpqi_z_used"): Likewise.
2003-04-12 Mark Mitchell <mark@codesourcery.com> 2003-04-12 Mark Mitchell <mark@codesourcery.com>
PR c++/7910 PR c++/7910
......
...@@ -143,6 +143,7 @@ ...@@ -143,6 +143,7 @@
(A_REGNUM 5) ; A (high part of D) (A_REGNUM 5) ; A (high part of D)
(B_REGNUM 6) ; B (low part of D) (B_REGNUM 6) ; B (low part of D)
(CC_REGNUM 7) ; Condition code register (CC_REGNUM 7) ; Condition code register
(SOFT_Z_REGNUM 11) ; Z soft register
]) ])
;;-------------------------------------------------------------------- ;;--------------------------------------------------------------------
...@@ -258,7 +259,7 @@ ...@@ -258,7 +259,7 @@
[(set (cc0) [(set (cc0)
(match_operand:QI 0 "tst_operand" "")) (match_operand:QI 0 "tst_operand" ""))
(use (match_operand:HI 1 "hard_reg_operand" "")) (use (match_operand:HI 1 "hard_reg_operand" ""))
(use (reg:HI 11))] (use (reg:HI SOFT_Z_REGNUM))]
"z_replacement_completed == 2" "z_replacement_completed == 2"
[(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 1)) [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 1))
(set (match_dup 1) (match_dup 2)) (set (match_dup 1) (match_dup 2))
...@@ -365,7 +366,7 @@ ...@@ -365,7 +366,7 @@
(compare (match_operand:HI 0 "tst_operand" "dxy,m") (compare (match_operand:HI 0 "tst_operand" "dxy,m")
(match_operand:HI 1 "cmp_operand" "m,dxy"))) (match_operand:HI 1 "cmp_operand" "m,dxy")))
(use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy")) (use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy"))
(use (reg:HI 11))] (use (reg:HI SOFT_Z_REGNUM))]
"" ""
"#") "#")
...@@ -374,7 +375,7 @@ ...@@ -374,7 +375,7 @@
(compare (match_operand:HI 0 "tst_operand" "") (compare (match_operand:HI 0 "tst_operand" "")
(match_operand:HI 1 "cmp_operand" ""))) (match_operand:HI 1 "cmp_operand" "")))
(use (match_operand:HI 2 "hard_reg_operand" "")) (use (match_operand:HI 2 "hard_reg_operand" ""))
(use (reg:HI 11))] (use (reg:HI SOFT_Z_REGNUM))]
"z_replacement_completed == 2" "z_replacement_completed == 2"
[(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2)) [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2))
(set (match_dup 2) (match_dup 3)) (set (match_dup 2) (match_dup 3))
...@@ -456,7 +457,7 @@ ...@@ -456,7 +457,7 @@
(and:QI (match_operand:QI 0 "tst_operand" "d,m") (and:QI (match_operand:QI 0 "tst_operand" "d,m")
(match_operand:QI 1 "cmp_operand" "m,d"))) (match_operand:QI 1 "cmp_operand" "m,d")))
(use (match_operand:HI 2 "hard_reg_operand" "xy,xy")) (use (match_operand:HI 2 "hard_reg_operand" "xy,xy"))
(use (reg:HI 11))] (use (reg:HI SOFT_Z_REGNUM))]
"" ""
"#") "#")
...@@ -465,12 +466,12 @@ ...@@ -465,12 +466,12 @@
(and:QI (match_operand:QI 0 "tst_operand" "") (and:QI (match_operand:QI 0 "tst_operand" "")
(match_operand:QI 1 "cmp_operand" ""))) (match_operand:QI 1 "cmp_operand" "")))
(use (match_operand:HI 2 "hard_reg_operand" "")) (use (match_operand:HI 2 "hard_reg_operand" ""))
(use (reg:HI 11))] (use (reg:HI SOFT_Z_REGNUM))]
"z_replacement_completed == 2" "z_replacement_completed == 2"
[(set (mem:HI (pre_dec:HI (reg:HI 3))) (match_dup 2)) [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2))
(set (match_dup 2) (match_dup 3)) (set (match_dup 2) (match_dup 3))
(set (cc0) (and:QI (match_dup 0) (match_dup 1))) (set (cc0) (and:QI (match_dup 0) (match_dup 1)))
(set (match_dup 2) (mem:HI (post_inc:HI (reg:HI 3))))] (set (match_dup 2) (mem:HI (post_inc:HI (reg:HI SP_REGNUM))))]
"operands[3] = gen_rtx (REG, HImode, SOFT_Z_REGNUM);") "operands[3] = gen_rtx (REG, HImode, SOFT_Z_REGNUM);")
(define_insn "bitcmphi" (define_insn "bitcmphi"
...@@ -546,7 +547,7 @@ ...@@ -546,7 +547,7 @@
(compare (match_operand:QI 0 "tst_operand" "dxy,m") (compare (match_operand:QI 0 "tst_operand" "dxy,m")
(match_operand:QI 1 "cmp_operand" "m,dxy"))) (match_operand:QI 1 "cmp_operand" "m,dxy")))
(use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy")) (use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy"))
(use (reg:HI 11))] (use (reg:HI SOFT_Z_REGNUM))]
"" ""
"#") "#")
...@@ -555,7 +556,7 @@ ...@@ -555,7 +556,7 @@
(compare (match_operand:QI 0 "tst_operand" "") (compare (match_operand:QI 0 "tst_operand" "")
(match_operand:QI 1 "cmp_operand" ""))) (match_operand:QI 1 "cmp_operand" "")))
(use (match_operand:HI 2 "hard_reg_operand" "")) (use (match_operand:HI 2 "hard_reg_operand" ""))
(use (reg:HI 11))] (use (reg:HI SOFT_Z_REGNUM))]
"z_replacement_completed == 2" "z_replacement_completed == 2"
[(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2)) [(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2))
(set (match_dup 2) (match_dup 3)) (set (match_dup 2) (match_dup 3))
...@@ -620,7 +621,7 @@ ...@@ -620,7 +621,7 @@
;; because there is no memory->memory moves. It must be defined with ;; because there is no memory->memory moves. It must be defined with
;; earlyclobber (&) so that it does not appear in the source or destination ;; earlyclobber (&) so that it does not appear in the source or destination
;; address. Providing patterns for movdi/movdf allows GCC to generate ;; address. Providing patterns for movdi/movdf allows GCC to generate
;; better code. [Until now, the scratch register is limited to D becuse ;; better code. [Until now, the scratch register is limited to D because
;; otherwise we can run out of registers in the A_REGS class for reload]. ;; otherwise we can run out of registers in the A_REGS class for reload].
;; ;;
;; For 68HC12, the scratch register is not necessary. To use the same ;; For 68HC12, the scratch register is not necessary. To use the same
......
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