+2014-09-18 John David Anglin <danglin@gcc.gnu.org>
+
+ * config/pa/pa-protos.h (pa_cint_ok_for_move): Change argument type to
+ unsigned.
+ (pa_ldil_cint_p): Likewise.
+ * config/pa/pa.c (pa_cint_ok_for_move): likewise.
+ (pa_ldil_cint_p): Likewise. Change signed casts to unsigned.
+ Update callers.
+ * config/pa/pa.md: Likewise.
+
2015-09-18 David Malcolm <dmalcolm@redhat.com>
* Makefile.in (OBJS-libcommon): Add diagnostic-show-locus.o.
#endif /* RTX_CODE */
extern int pa_and_mask_p (unsigned HOST_WIDE_INT);
-extern int pa_cint_ok_for_move (HOST_WIDE_INT);
+extern int pa_cint_ok_for_move (unsigned HOST_WIDE_INT);
extern int pa_ior_mask_p (unsigned HOST_WIDE_INT);
-extern int pa_ldil_cint_p (HOST_WIDE_INT);
+extern int pa_ldil_cint_p (unsigned HOST_WIDE_INT);
extern int pa_mem_shadd_constant_p (int);
extern int pa_shadd_constant_p (int);
extern int pa_zdepi_cint_p (unsigned HOST_WIDE_INT);
/* Accept any constant that can be moved in one instruction into a
general register. */
int
-pa_cint_ok_for_move (HOST_WIDE_INT ival)
+pa_cint_ok_for_move (unsigned HOST_WIDE_INT ival)
{
/* OK if ldo, ldil, or zdepi, can be used. */
return (VAL_14_BITS_P (ival)
significant 11 bits of the value must be zero and the value must
not change sign when extended from 32 to 64 bits. */
int
-pa_ldil_cint_p (HOST_WIDE_INT ival)
+pa_ldil_cint_p (unsigned HOST_WIDE_INT ival)
{
- HOST_WIDE_INT x = ival & (((HOST_WIDE_INT) -1 << 31) | 0x7ff);
+ unsigned HOST_WIDE_INT x;
- return x == 0 || x == ((HOST_WIDE_INT) -1 << 31);
+ x = ival & (((unsigned HOST_WIDE_INT) -1 << 31) | 0x7ff);
+ return x == 0 || x == ((unsigned HOST_WIDE_INT) -1 << 31);
}
/* True iff zdepi can be used to generate this CONST_INT.
if (register_operand (operand1, mode)
|| (GET_CODE (operand1) == CONST_INT
- && pa_cint_ok_for_move (INTVAL (operand1)))
+ && pa_cint_ok_for_move (UINTVAL (operand1)))
|| (operand1 == CONST0_RTX (mode))
|| (GET_CODE (operand1) == HIGH
&& !symbolic_operand (XEXP (operand1, 0), VOIDmode))
operands[1] = tmp;
}
else if (GET_CODE (operand1) != CONST_INT
- || !pa_cint_ok_for_move (INTVAL (operand1)))
+ || !pa_cint_ok_for_move (UINTVAL (operand1)))
{
rtx temp;
rtx_insn *insn;
&& !reload_in_progress
&& !reload_completed
&& !LEGITIMATE_64BIT_CONST_INT_P (INTVAL (x))
- && !pa_cint_ok_for_move (INTVAL (x)))
+ && !pa_cint_ok_for_move (UINTVAL (x)))
return false;
if (function_label_operand (x, mode))
(plus:SI (match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "const_int_operand" "")))
(clobber (match_operand:SI 4 "register_operand" ""))]
- "! pa_cint_ok_for_move (INTVAL (operands[2]))
+ "! pa_cint_ok_for_move (UINTVAL (operands[2]))
&& VAL_14_BITS_P (INTVAL (operands[2]) >> 1)"
[(set (match_dup 4) (plus:SI (match_dup 1) (match_dup 2)))
(set (match_dup 0) (plus:SI (match_dup 4) (match_dup 3)))]
(plus:SI (match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "const_int_operand" "")))
(clobber (match_operand:SI 4 "register_operand" ""))]
- "! pa_cint_ok_for_move (INTVAL (operands[2]))"
+ "! pa_cint_ok_for_move (UINTVAL (operands[2]))"
[(set (match_dup 4) (match_dup 2))
(set (match_dup 0) (plus:SI (ashift:SI (match_dup 4) (match_dup 3))
(match_dup 1)))]
"
{
- HOST_WIDE_INT intval = INTVAL (operands[2]);
+ unsigned HOST_WIDE_INT intval = UINTVAL (operands[2]);
/* Try dividing the constant by 2, then 4, and finally 8 to see
if we can get a constant which can be loaded into a register