aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStephane Carrez <Stephane.Carrez@worldnet.fr>2001-08-04 13:26:17 +0200
committerStephane Carrez <ciceron@gcc.gnu.org>2001-08-04 13:26:17 +0200
commit03997728b499f76a20356705aa4d05d808ab9c3c (patch)
treed057cc5cf6f89327b86d2088d790e78c65b66af3 /gcc
parentd8de89e827441c22b129365aeb4f0a2626448aa5 (diff)
downloadgcc-03997728b499f76a20356705aa4d05d808ab9c3c.zip
gcc-03997728b499f76a20356705aa4d05d808ab9c3c.tar.gz
gcc-03997728b499f76a20356705aa4d05d808ab9c3c.tar.bz2
m68hc11.md ("cmphi_1", "cmpqi_1"): Allow memory and soft register for operand 0.
* config/m68hc11/m68hc11.md ("cmphi_1", "cmpqi_1"): Allow memory and soft register for operand 0. ("cmphi_z_used", "cmpqi_z_used"): Allow memory for operand 0. From-SVN: r44631
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/m68hc11/m68hc11.md57
2 files changed, 41 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8a77fa0..abb7295 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2001-08-04 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+ * config/m68hc11/m68hc11.md ("cmphi_1", "cmpqi_1"): Allow memory
+ and soft register for operand 0.
+ ("cmphi_z_used", "cmpqi_z_used"): Allow memory for operand 0.
+
+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.
diff --git a/gcc/config/m68hc11/m68hc11.md b/gcc/config/m68hc11/m68hc11.md
index c87a218..171d6e8 100644
--- a/gcc/config/m68hc11/m68hc11.md
+++ b/gcc/config/m68hc11/m68hc11.md
@@ -303,13 +303,18 @@
(define_insn "cmphi_1"
[(set (cc0)
(compare (match_operand:HI 0 "tst_operand"
- "xy,d,?xy,d,dxy,dxy,dxy")
+ "x,dy,xyd,?xy,d,m,!u,dxy,dxy")
(match_operand:HI 1 "cmp_operand"
- "i,i,m,m,?*d*A,?u,!*w")))]
+ "i,i,!u,m,m,dxy,dxy,?*d*A,!*w")))]
""
"*
{
- if (H_REG_P (operands[1]))
+ if (H_REG_P (operands[1]) && !H_REG_P (operands[0]))
+ {
+ cc_status.flags |= CC_REVERSED;
+ return \"cp%1\\t%0\";
+ }
+ else if (H_REG_P (operands[1]))
return \"#\";
else
return \"cp%0\\t%1\";
@@ -317,18 +322,18 @@
(define_insn "cmphi_z_used"
[(set (cc0)
- (compare (match_operand:HI 0 "hard_reg_operand" "dxy")
- (match_operand:HI 1 "cmp_operand" "m")))
- (use (match_operand:HI 2 "hard_reg_operand" "dxy"))
+ (compare (match_operand:HI 0 "tst_operand" "dxy,m")
+ (match_operand:HI 1 "cmp_operand" "m,dxy")))
+ (use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy"))
(use (reg:HI 11))]
""
"#")
(define_split /* "cmphi_z_used" */
[(set (cc0)
- (compare (match_operand:HI 0 "hard_reg_operand" "dxy")
- (match_operand:HI 1 "cmp_operand" "m")))
- (use (match_operand:HI 2 "hard_reg_operand" "dxy"))
+ (compare (match_operand:HI 0 "tst_operand" "dxy,m")
+ (match_operand:HI 1 "cmp_operand" "m,dxy")))
+ (use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy"))
(use (reg:HI 11))]
"z_replacement_completed == 2"
[(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2))
@@ -479,29 +484,37 @@
(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")))]
+ (compare (match_operand:QI 0 "tst_operand" "d,m,d,!u,*B,d")
+ (match_operand:QI 1 "cmp_operand" "im,d,!u,d,?dim*B,*u")))]
""
- "@
- cmpb\\t%1
- cmpb\\t%b1
- #
- #")
+ "*
+{
+ if (A_REG_P (operands[0]) || A_REG_P (operands[1]))
+ {
+ return \"#\";
+ }
+ else if (D_REG_P (operands[0]))
+ {
+ return \"cmpb\\t%b1\";
+ }
+ cc_status.flags |= CC_REVERSED;
+ return \"cmpb\\t%b0\";
+}")
(define_insn "cmpqi_z_used"
[(set (cc0)
- (compare (match_operand:QI 0 "hard_reg_operand" "dxy")
- (match_operand:QI 1 "cmp_operand" "m")))
- (use (match_operand:HI 2 "hard_reg_operand" "dxy"))
+ (compare (match_operand:QI 0 "tst_operand" "dxy,m")
+ (match_operand:QI 1 "cmp_operand" "m,dxy")))
+ (use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy"))
(use (reg:HI 11))]
""
"#")
(define_split /* cmpqi_z_used */
[(set (cc0)
- (compare (match_operand:QI 0 "hard_reg_operand" "dxy")
- (match_operand:QI 1 "cmp_operand" "m")))
- (use (match_operand:HI 2 "hard_reg_operand" "dxy"))
+ (compare (match_operand:QI 0 "tst_operand" "dxy,m")
+ (match_operand:QI 1 "cmp_operand" "m,dxy")))
+ (use (match_operand:HI 2 "hard_reg_operand" "dxy,dxy"))
(use (reg:HI 11))]
"z_replacement_completed == 2"
[(set (mem:HI (pre_dec:HI (reg:HI SP_REGNUM))) (match_dup 2))