This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: Fix some constraints in 68hc11.md
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH]: Fix some constraints in 68hc11.md
- From: Stephane Carrez <Stephane dot Carrez at worldnet dot fr>
- Date: Sat, 05 May 2001 09:01:55 +0200
Hi!
This patch tunes and fixes several constraints for 68hc11.md.
I've committed it on mainline and 3_0-branch.
Stephane
2001-05-05 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* config/m68hc11/m68hc11.md ("*logicalsi3_silshr16"): Use '?' instead
of '!' for the 'D' alternative ('!' is too strong).
("*logicalsi3_silshl16"): Likewise.
("movstricthi"): Accept 'A' when 'd' constraint, remove spurious '+'.
("movstrictsi"): Remove spurious '+'.
("movstrictqi"): Don't accept 'A' and remove spurious '+'.
("tstqi_1", "*lshrqi3_const1"): Put 'm' constraint before 'd'.
("subqi3"): Disparage with '!' the 'x' and 'y' registers to avoid
a reload to them.
Index: config/m68hc11/m68hc11.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/m68hc11/m68hc11.md,v
retrieving revision 1.8
diff -u -p -r1.8 m68hc11.md
--- m68hc11.md 2001/05/04 21:04:04 1.8
+++ m68hc11.md 2001/05/05 06:47:04
@@ -207,11 +207,11 @@
(define_insn "tstqi_1"
[(set (cc0)
- (match_operand:QI 0 "tst_operand" "d,m,*A,!u"))]
+ (match_operand:QI 0 "tst_operand" "m,d,*A,!u"))]
""
"@
- tstb
tst\\t%0
+ tstb
#
tst\\t%b0")
@@ -467,7 +467,7 @@
(define_insn "cmpqi_1"
[(set (cc0)
(compare (match_operand:QI 0 "tst_operand" "d,d,*x*y,*x*y")
- (match_operand:QI 1 "cmp_operand" "im,?u,?u,?dim*x*y")))]
+ (match_operand:QI 1 "cmp_operand" "im,!u,!u,?dim*x*y")))]
""
"@
cmpb\\t%1
@@ -531,40 +531,40 @@
;; description but not for GCC optimization passes.
;;
(define_insn "movstrictsi"
- [(set (strict_low_part (match_operand:SI 0 "non_push_operand" "+um,+D,+D"))
+ [(set (strict_low_part (match_operand:SI 0 "non_push_operand" "+um,D,D"))
(match_operand:SI 1 "general_operand" "D,Dim,uD"))]
""
"#")
(define_split
- [(set (strict_low_part (match_operand:SI 0 "non_push_operand" "+um,+D,+D"))
+ [(set (strict_low_part (match_operand:SI 0 "non_push_operand" "+um,D,D"))
(match_operand:SI 1 "general_operand" "D,Dim,u"))]
"z_replacement_completed == 2"
[(set (match_dup 0) (match_dup 1))]
"")
(define_insn "movstricthi"
- [(set (strict_low_part (match_operand:HI 0 "non_push_operand" "+um,+d,+d"))
- (match_operand:HI 1 "general_operand" "d,dim,u"))]
+ [(set (strict_low_part (match_operand:HI 0 "non_push_operand" "+um,dA,dA"))
+ (match_operand:HI 1 "general_operand" "dA,dAim,u"))]
""
"#")
(define_split
- [(set (strict_low_part (match_operand:HI 0 "non_push_operand" "+um,+d,+d"))
- (match_operand:HI 1 "general_operand" "d,dim,u"))]
+ [(set (strict_low_part (match_operand:HI 0 "non_push_operand" "+um,dA,dA"))
+ (match_operand:HI 1 "general_operand" "dA,dAim,u"))]
"z_replacement_completed == 2"
[(set (match_dup 0) (match_dup 1))]
"")
(define_insn "movstrictqi"
- [(set (strict_low_part (match_operand:QI 0 "non_push_operand" "+mu,+!d"))
- (match_operand:QI 1 "general_operand" "d,imu"))]
+ [(set (strict_low_part (match_operand:QI 0 "non_push_operand" "+mu,!dA"))
+ (match_operand:QI 1 "general_operand" "d,imudA"))]
""
"#")
(define_split
- [(set (strict_low_part (match_operand:QI 0 "non_push_operand" "+mu,+d,+d"))
- (match_operand:QI 1 "general_operand" "d,dim,u"))]
+ [(set (strict_low_part (match_operand:QI 0 "non_push_operand" "+mu,dA"))
+ (match_operand:QI 1 "general_operand" "d,imudA"))]
"z_replacement_completed == 2"
[(set (match_dup 0) (match_dup 1))]
"")
@@ -2586,9 +2586,9 @@
}")
(define_insn "subqi3"
- [(set (match_operand:QI 0 "hard_reg_operand" "=dq*x*y")
- (minus:QI (match_operand:QI 1 "hard_reg_operand" "0")
- (match_operand:QI 2 "general_operand" "uim*x*y*d")))]
+ [(set (match_operand:QI 0 "hard_reg_operand" "=dq,!*x*y")
+ (minus:QI (match_operand:QI 1 "hard_reg_operand" "0,0")
+ (match_operand:QI 2 "general_operand" "uim*A*d,uim*A*d")))]
""
"*
{
@@ -3378,7 +3378,7 @@
[(set (match_operand:SI 0 "register_operand" "=D,D")
(match_operator:SI 3 "m68hc11_logical_operator"
[(lshiftrt:SI
- (match_operand:SI 1 "general_operand" "uim,!D")
+ (match_operand:SI 1 "general_operand" "uim,?D")
(const_int 16))
(match_operand:SI 2 "general_operand" "uim,0")]))]
""
@@ -3388,7 +3388,7 @@
[(set (match_operand:SI 0 "register_operand" "=D,D")
(match_operator:SI 3 "m68hc11_logical_operator"
[(lshiftrt:SI
- (match_operand:SI 1 "general_operand" "uim,!D")
+ (match_operand:SI 1 "general_operand" "uim,?D")
(const_int 16))
(match_operand:SI 2 "general_operand" "uim,0")]))]
"reload_completed"
@@ -3414,7 +3414,7 @@
[(set (match_operand:SI 0 "register_operand" "=D,D")
(match_operator:SI 3 "m68hc11_logical_operator"
[(ashift:SI
- (match_operand:SI 1 "general_operand" "uim,!D")
+ (match_operand:SI 1 "general_operand" "uim,?D")
(const_int 16))
(match_operand:SI 2 "general_operand" "0,0")]))]
""
@@ -3424,7 +3424,7 @@
[(set (match_operand:SI 0 "register_operand" "=D,D")
(match_operator:SI 3 "m68hc11_logical_operator"
[(ashift:SI
- (match_operand:SI 1 "general_operand" "uim,!D")
+ (match_operand:SI 1 "general_operand" "uim,?D")
(const_int 16))
(match_operand:SI 2 "general_operand" "0,0")]))]
"z_replacement_completed == 2"
@@ -3898,7 +3898,7 @@
[(set (match_operand:DI 0 "nonimmediate_operand" "=<,m,u")
(ashift:DI (match_operand:DI 1 "general_operand" "umi,umi,umi")
(const_int 32)))
- (clobber (match_scratch:HI 2 "=A,d,d"))]
+ (clobber (match_scratch:HI 2 "=&A,d,d"))]
""
"#")
@@ -5075,13 +5075,13 @@
"")
(define_insn "*lshrqi3_const1"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=d,m,!u,!*q,!*A")
+ [(set (match_operand:QI 0 "nonimmediate_operand" "=m,d,!u,!*q,!*A")
(lshiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0,0,0,0,0")
(const_int 1)))]
""
"@
- lsrb
lsr\\t%b0
+ lsrb
lsr\\t%b0
lsr%0
#")