+2019-10-02 Michael Meissner <meissner@linux.ibm.com>
+
+ * config/rs6000/rs6000.c (mem_operand_gpr): Use
+ SIGNED_16BIT_OFFSET_EXTRA_P macro.
+ (mem_operand_ds_form): Use SIGNED_16BIT_OFFSET_EXTRA_P macro.
+ (rs6000_mode_dependent_address): Use SIGNED_16BIT_OFFSET_EXTRA_P
+ macro.
+
2019-10-02 Joseph Myers <joseph@codesourcery.com>
* ginclude/stdint-gcc.h [__STDC_WANT_IEC_60559_BFP_EXT__]: Change
;; Return 1 if OP is a constant but not a valid add_operand.
(define_predicate "non_add_cint_operand"
(and (match_code "const_int")
- (not (match_operand 0 "add_operand"))))
+ (match_test "!satisfies_constraint_I (op)
+ && !satisfies_constraint_L (op)")))
;; Return 1 if the operand is a constant that can be used as the operand
;; of an AND, OR or XOR.
causes a wrap, so test only the low 16 bits. */
offset = ((offset & 0xffff) ^ 0x8000) - 0x8000;
- return offset + 0x8000 < 0x10000u - extra;
+ return SIGNED_16BIT_OFFSET_EXTRA_P (offset, extra);
}
/* As above, but for DS-FORM VSX insns. Unlike mem_operand_gpr,
causes a wrap, so test only the low 16 bits. */
offset = ((offset & 0xffff) ^ 0x8000) - 0x8000;
- return offset + 0x8000 < 0x10000u - extra;
+ return SIGNED_16BIT_OFFSET_EXTRA_P (offset, extra);
}
\f
/* Subroutines of rs6000_legitimize_address and rs6000_legitimate_address_p. */
break;
}
- offset += 0x8000;
- return offset < 0x10000 - extra;
+ return SIGNED_16BIT_OFFSET_EXTRA_P (offset, extra);
}
bool
&& XEXP (addr, 0) != arg_pointer_rtx
&& CONST_INT_P (XEXP (addr, 1)))
{
- unsigned HOST_WIDE_INT val = INTVAL (XEXP (addr, 1));
- return val + 0x8000 >= 0x10000 - (TARGET_POWERPC64 ? 8 : 12);
+ HOST_WIDE_INT val = INTVAL (XEXP (addr, 1));
+ HOST_WIDE_INT extra = TARGET_POWERPC64 ? 8 : 12;
+ return !SIGNED_16BIT_OFFSET_EXTRA_P (val, extra);
}
break;