aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/cris/cris.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/cris/cris.c')
-rw-r--r--gcc/config/cris/cris.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 2eb864f065c..e63ad200352 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -328,6 +328,22 @@ cris_operand_extend_operator (x, mode)
&& (code == PLUS || code == MINUS || code == UMIN));
}
+/* Check if MODE is same as mode for X, and X is PLUS or MINUS. */
+
+int
+cris_additive_operand_extend_operator (x, mode)
+ rtx x;
+ enum machine_mode mode;
+{
+ enum rtx_code code = GET_CODE (x);
+
+ if (mode == VOIDmode)
+ mode = GET_MODE (x);
+
+ return (GET_MODE (x) == mode
+ && (code == PLUS || code == MINUS));
+}
+
/* Check to see if MODE is same as mode for X, and X is SIGN_EXTEND or
ZERO_EXTEND. */