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
This commit is contained in:
Eric Botcazou 2017-12-20 09:52:15 +00:00
parent c58257d94e
commit 98f8b67f22
4 changed files with 14 additions and 8 deletions

View file

@ -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>

View file

@ -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"

View file

@ -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"

View file

@ -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)