+2020-09-02 Alan Modra <amodra@gmail.com>
+
+ * cgen-ibld.in (insert_normal, extract_normal): Use 1UL in left shift.
+ * bpf-ibld.c: Regenerate.
+ * epiphany-ibld.c: Regenerate.
+ * fr30-ibld.c: Regenerate.
+ * frv-ibld.c: Regenerate.
+ * ip2k-ibld.c: Regenerate.
+ * iq2000-ibld.c: Regenerate.
+ * lm32-ibld.c: Regenerate.
+ * m32c-ibld.c: Regenerate.
+ * m32r-ibld.c: Regenerate.
+ * mep-ibld.c: Regenerate.
+ * mt-ibld.c: Regenerate.
+ * or1k-ibld.c: Regenerate.
+ * xc16x-ibld.c: Regenerate.
+ * xstormy16-ibld.c: Regenerate.
+
2020-09-02 Alan Modra <amodra@gmail.com>
* bfin-dis.c (MASKBITS): Use SIGNBIT.
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
/* Ensure VALUE will fit. */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
{
- long minval = - (1L << (length - 1));
+ long minval = - (1UL << (length - 1));
unsigned long maxval = mask;
if ((value > 0 && (unsigned long) value > maxval)
{
if (! cgen_signed_overflow_ok_p (cd))
{
- long minval = - (1L << (length - 1));
- long maxval = (1L << (length - 1)) - 1;
+ long minval = - (1UL << (length - 1));
+ long maxval = (1UL << (length - 1)) - 1;
if (value < minval || value > maxval)
{
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;