]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* config/m68hc11/m68hc11-protos.h
authorStephane Carrez <stcarrez@nerim.fr>
Sat, 12 Apr 2003 21:52:33 +0000 (23:52 +0200)
committerStephane Carrez <ciceron@gcc.gnu.org>
Sat, 12 Apr 2003 21:52:33 +0000 (23:52 +0200)
(m68hc11_eq_compare_operator): Declare
* config/m68hc11/m68hc11.h (PREDICATE_CODES): Register new predicate.
* config/m68hc11/m68hc11.c (m68hc11_eq_compare_operator): New predicate
(d_register_operand): Check the operand mode.
(hard_addr_reg_operand): Likewise.

From-SVN: r65529

gcc/ChangeLog
gcc/config/m68hc11/m68hc11-protos.h
gcc/config/m68hc11/m68hc11.c
gcc/config/m68hc11/m68hc11.h

index 4f73a65c7363ea4f53d02578619551288b4eae76..c49afa1e8f44280cbc8843a60ac8159dc3d856af 100644 (file)
@@ -1,3 +1,12 @@
+2003-04-12  Stephane Carrez  <stcarrez@nerim.fr>
+
+       * config/m68hc11/m68hc11-protos.h 
+       (m68hc11_eq_compare_operator): Declare
+       * config/m68hc11/m68hc11.h (PREDICATE_CODES): Register new predicate.
+       * config/m68hc11/m68hc11.c (m68hc11_eq_compare_operator): New predicate
+       (d_register_operand): Check the operand mode.
+       (hard_addr_reg_operand): Likewise.
+
 2003-04-12  Stephane Carrez  <stcarrez@nerim.fr>
 
        * config/m68hc11/m68hc11.md ("decrement_and_branch_until_zero"): New
index 20b5ae02fa4ed57fc3b1ee6999574722bcb5efd7..3c814d73ece4a74c5ed471c10b173ca34e979745 100644 (file)
@@ -120,6 +120,7 @@ extern int m68hc11_arith_operator PARAMS((rtx, enum machine_mode));
 extern int m68hc11_non_shift_operator PARAMS((rtx, enum machine_mode));
 extern int m68hc11_shift_operator PARAMS((rtx, enum machine_mode));
 extern int m68hc11_unary_operator PARAMS((rtx, enum machine_mode));
+extern int m68hc11_eq_compare_operator PARAMS((rtx, enum machine_mode));
 extern int non_push_operand PARAMS((rtx, enum machine_mode));
 extern int hard_reg_operand PARAMS((rtx, enum machine_mode));
 extern int soft_reg_operand PARAMS((rtx, enum machine_mode));
index 5c762cace35f96ae619421b7c5b6bbacfb4bf95f..abada3cc2848d7887b545da74742272745bbf0b8 100644 (file)
@@ -1026,6 +1026,9 @@ d_register_operand (operand, mode)
      rtx operand;
      enum machine_mode mode ATTRIBUTE_UNUSED;
 {
+  if (GET_MODE (operand) != mode && mode != VOIDmode)
+    return 0;
+
   if (GET_CODE (operand) == SUBREG)
     operand = XEXP (operand, 0);
 
@@ -1040,6 +1043,9 @@ hard_addr_reg_operand (operand, mode)
      rtx operand;
      enum machine_mode mode ATTRIBUTE_UNUSED;
 {
+  if (GET_MODE (operand) != mode && mode != VOIDmode)
+    return 0;
+
   if (GET_CODE (operand) == SUBREG)
     operand = XEXP (operand, 0);
 
@@ -1131,6 +1137,14 @@ symbolic_memory_operand (op, mode)
     }
 }
 
+int
+m68hc11_eq_compare_operator (op, mode)
+     register rtx op;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
+{
+  return GET_CODE (op) == EQ || GET_CODE (op) == NE;
+}
+
 int
 m68hc11_logical_operator (op, mode)
      register rtx op;
index cb689cc6454f6bceb78846b5f904c506d2db5e4a..a29f56d7005395844b7af5706866d6700b58d554 100644 (file)
@@ -1665,6 +1665,7 @@ do {                                                                    \
 {"m68hc11_non_shift_operator", {AND, IOR, XOR, PLUS, MINUS}},          \
 {"m68hc11_unary_operator",   {NEG, NOT, SIGN_EXTEND, ZERO_EXTEND}},    \
 {"m68hc11_shift_operator",   {ASHIFT, ASHIFTRT, LSHIFTRT, ROTATE, ROTATERT}},\
+{"m68hc11_eq_compare_operator", {EQ, NE}},                              \
 {"non_push_operand",         {SUBREG, REG, MEM}},                      \
 {"reg_or_some_mem_operand",  {SUBREG, REG, MEM}},                      \
 {"tst_operand",              {SUBREG, REG, MEM}},                      \