===================================================================
@@ -174,7 +174,6 @@
static void print_slot (rtx);
static rtx add_constant (rtx, enum machine_mode, rtx);
static void dump_table (rtx, rtx);
-static int hi_const (rtx);
static int broken_move (rtx);
static int mova_p (rtx);
static rtx find_barrier (int, rtx, rtx);
@@ -4293,17 +4292,6 @@
pool_window_last = 0;
}
-/* Return nonzero if constant would be an ok source for a
- mov.w instead of a mov.l. */
-
-static int
-hi_const (rtx src)
-{
- return (CONST_INT_P (src)
- && INTVAL (src) >= -32768
- && INTVAL (src) <= 32767);
-}
-
#define MOVA_LABELREF(mova) XVECEXP (SET_SRC (PATTERN (mova)), 0, 0)
/* Nonzero if the insn is a move instruction which needs to be fixed. */
@@ -4583,7 +4571,8 @@
front end will generate code to load unsigned constants into
HImode targets without properly sign extending them. */
if (mode == HImode
- || (mode == SImode && hi_const (src) && REGNO (dst) != FPUL_REG))
+ || (mode == SImode && satisfies_constraint_I16 (src)
+ && REGNO (dst) != FPUL_REG))
{
found_hi += 2;
/* We put the short constants before the long constants, so
@@ -5726,7 +5715,7 @@
dst = SET_DEST (pat);
mode = GET_MODE (dst);
- if (mode == SImode && hi_const (src)
+ if (mode == SImode && satisfies_constraint_I16 (src)
&& REGNO (dst) != FPUL_REG)
{
int offset = 0;