summaryrefslogtreecommitdiff
path: root/gcc/config/m68hc11
diff options
context:
space:
mode:
authorciceron <ciceron@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-12 21:52:33 +0000
committerciceron <ciceron@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-12 21:52:33 +0000
commit77f85b6ead93ef444e8cdcb6d9bbbd4623e64f6b (patch)
treeac756bba7a33b86f559e069a5f577170fe03c5f9 /gcc/config/m68hc11
parent171bfe897473d8b6d5786c9ac35d5a74962ad59d (diff)
downloadgcc-77f85b6ead93ef444e8cdcb6d9bbbd4623e64f6b.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65529 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68hc11')
-rw-r--r--gcc/config/m68hc11/m68hc11-protos.h1
-rw-r--r--gcc/config/m68hc11/m68hc11.c14
-rw-r--r--gcc/config/m68hc11/m68hc11.h1
3 files changed, 16 insertions, 0 deletions
diff --git a/gcc/config/m68hc11/m68hc11-protos.h b/gcc/config/m68hc11/m68hc11-protos.h
index 20b5ae02fa4..3c814d73ece 100644
--- a/gcc/config/m68hc11/m68hc11-protos.h
+++ b/gcc/config/m68hc11/m68hc11-protos.h
@@ -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));
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index 5c762cace35..abada3cc284 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -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);
@@ -1132,6 +1138,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;
enum machine_mode mode ATTRIBUTE_UNUSED;
diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h
index cb689cc6454..a29f56d7005 100644
--- a/gcc/config/m68hc11/m68hc11.h
+++ b/gcc/config/m68hc11/m68hc11.h
@@ -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}}, \