aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/visium/constraints.md6
-rw-r--r--gcc/config/visium/predicates.md2
-rw-r--r--gcc/config/visium/visium.c4
4 files changed, 14 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bc881e5..3fac117 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,8 +1,14 @@
+2017-12-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * 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.
+
2017-12-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/82975
- * config/arm/arm.h (TEST_REGNO): Adjust comment as expected in
- r255830.
+ * config/arm/arm.h (TEST_REGNO): Adjust comment as expected in r255830.
2017-12-20 Jakub Jelinek <jakub@redhat.com>
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)