diff options
Diffstat (limited to 'gcc/config/cris/cris.c')
-rw-r--r-- | gcc/config/cris/cris.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 4a08ae03aee..06568023051 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see #include "tm_p.h" #include "debug.h" #include "output.h" +#include "tm-constrs.h" #include "target.h" #include "target-def.h" #include "ggc.h" @@ -703,8 +704,7 @@ cris_print_operand (FILE *file, rtx x, int code) case 'b': /* Print the unsigned supplied integer as if it were signed and < 0, i.e print 255 or 65535 as -1, 254, 65534 as -2, etc. */ - if (!CONST_INT_P (x) - || !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (x), 'O')) + if (!satisfies_constraint_O (x)) LOSE_AND_RETURN ("invalid operand for 'b' modifier", x); fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x)| (INTVAL (x) <= 255 ? ~255 : ~65535)); @@ -1692,9 +1692,7 @@ cris_normal_notice_update_cc (rtx exp, rtx insn) && (REGNO (SET_SRC (exp)) > CRIS_LAST_GENERAL_REGISTER)) || (TARGET_V32 - && GET_CODE (SET_SRC (exp)) == CONST_INT - && CRIS_CONST_OK_FOR_LETTER_P (INTVAL (SET_SRC (exp)), - 'I'))) + && satisfies_constraint_I (SET_SRC (exp)))) { /* There's no CC0 change for this case. Just check for overlap. */ @@ -2037,7 +2035,7 @@ cris_rtx_costs (rtx x, int code, int outer_code, int opno, int *total, if (CONST_INT_P (XEXP (x, 1)) /* Two constants may actually happen before optimization. */ && !CONST_INT_P (XEXP (x, 0)) - && !CRIS_CONST_OK_FOR_LETTER_P (INTVAL (XEXP (x, 1)), 'I')) + && !satisfies_constraint_I (XEXP (x, 1))) { *total = (rtx_cost (XEXP (x, 0), (enum rtx_code) outer_code, @@ -2118,8 +2116,7 @@ cris_address_cost (rtx x, bool speed ATTRIBUTE_UNUSED) /* A BDAP -32768 .. 32767 is like BDAP quick, but with 2 extra bytes. */ - if (CONST_INT_P (tem2) - && CRIS_CONST_OK_FOR_LETTER_P (INTVAL (tem2), 'L')) + if (satisfies_constraint_L (tem2)) return (2 + 2) / 2; /* A BDAP with some other constant is 2 bytes extra. */ |