diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-12-20 09:52:15 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-12-20 09:52:15 +0000 |
commit | 98f8b67f2202c0f81fdacf661c1fa51f2ecb80fb (patch) | |
tree | 31a71f8d5726085eeeddf501e8e758c03acfd58c /gcc/config | |
parent | c58257d94e62861e44e17394ece1273d8e874b44 (diff) | |
download | gcc-98f8b67f2202c0f81fdacf661c1fa51f2ecb80fb.zip gcc-98f8b67f2202c0f81fdacf661c1fa51f2ecb80fb.tar.gz gcc-98f8b67f2202c0f81fdacf661c1fa51f2ecb80fb.tar.bz2 |
constraints.md (J, K, L): Use IN_RANGE macro.
* config/visium/constraints.md (J, K, L): Use IN_RANGE macro.
* config/visium/predicates.md (const_shift_operand): Likewise.
* config/visium/visium.c (visium_legitimize_address): Fix oversight.
(visium_legitimize_reload_address): Likewise.
From-SVN: r255856
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/visium/constraints.md | 6 | ||||
-rw-r--r-- | gcc/config/visium/predicates.md | 2 | ||||
-rw-r--r-- | gcc/config/visium/visium.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/gcc/config/visium/constraints.md b/gcc/config/visium/constraints.md index 15e0beb..053f1ef 100644 --- a/gcc/config/visium/constraints.md +++ b/gcc/config/visium/constraints.md @@ -48,17 +48,17 @@ (define_constraint "J" "Integer constant in the range 0 .. 65535 (16-bit immediate)" (and (match_code "const_int") - (match_test "ival >= 0 && ival <= 65535"))) + (match_test "IN_RANGE (ival, 0, 65535)"))) (define_constraint "K" "Integer constant in the range 1 .. 31 (5-bit immediate)" (and (match_code "const_int") - (match_test "ival >= 1 && ival <= 31"))) + (match_test "IN_RANGE (ival, 1, 31)"))) (define_constraint "L" "Integer constant in the range -65535 .. -1 (16-bit negative immediate)" (and (match_code "const_int") - (match_test "ival >= -65535 && ival <= -1"))) + (match_test "IN_RANGE (ival, -65535, -1)"))) (define_constraint "M" "Integer constant -1" diff --git a/gcc/config/visium/predicates.md b/gcc/config/visium/predicates.md index e1dd29c..ebfe4bc 100644 --- a/gcc/config/visium/predicates.md +++ b/gcc/config/visium/predicates.md @@ -25,7 +25,7 @@ ;; Return true if OP is a constant in the range 1 .. 31. (define_predicate "const_shift_operand" (and (match_code "const_int") - (match_test "INTVAL (op) >= 1 && INTVAL (op) <= 31"))) + (match_test "IN_RANGE (INTVAL (op), 1, 31)"))) ;; Return true if OP is either a register or the constant 0. (define_predicate "reg_or_0_operand" diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c index 58c4e57..1e3549d 100644 --- a/gcc/config/visium/visium.c +++ b/gcc/config/visium/visium.c @@ -1922,7 +1922,7 @@ visium_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, int offset_base = offset & ~mask; /* Check that all of the words can be accessed. */ - if (size > 4 && 0x80 < size + offset - offset_base) + if (size > 4 && size + offset - offset_base > 0x80) offset_base = offset & ~0x3f; if (offset_base != 0 && offset_base != offset && (offset & mask1) == 0) { @@ -1968,7 +1968,7 @@ visium_legitimize_reload_address (rtx x, machine_mode mode, int opnum, int offset_base = offset & ~mask; /* Check that all of the words can be accessed. */ - if (size > 4 && 0x80 < size + offset - offset_base) + if (size > 4 && size + offset - offset_base > 0x80) offset_base = offset & ~0x3f; if (offset_base && (offset & mask1) == 0) |