summaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-09-02 10:35:10 +0930
committerAlan Modra <amodra@gmail.com>2020-09-02 16:30:44 +0930
commitae3e98b418c6f31cc1999d67fc2422429d88de6f (patch)
tree87743aa47935a0e3fe6efaf8959bb0fe62240128 /opcodes
parent427202d96790f1b659e0fa9485b8128c95dc48db (diff)
downloadbinutils-gdb-ae3e98b418c6f31cc1999d67fc2422429d88de6f.tar.gz
ubsan: *-ibld.c
bfin-dis.c:160 shift exponent 32 is too large for 32-bit type 'long unsigned int' bpf-ibld.c:196 left shift of 1 by 31 places cannot be represented in type 'long int' bpf-ibld.c:196 negation of -2147483648 cannot be represented in type 'long int'; cast to an unsigned type to negate this itself bpf-ibld.c:197 left shift of 1 by 31 places cannot be represented in type 'long int' bpf-ibld.c:197 signed integer overflow: -2147483648 - 1 cannot be represented in type 'long int' bpf-ibld.c:501 left shift of 1 by 31 places cannot be represented in type 'long int' * 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.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog18
-rw-r--r--opcodes/bpf-ibld.c8
-rw-r--r--opcodes/cgen-ibld.in8
-rw-r--r--opcodes/epiphany-ibld.c8
-rw-r--r--opcodes/fr30-ibld.c8
-rw-r--r--opcodes/frv-ibld.c8
-rw-r--r--opcodes/ip2k-ibld.c8
-rw-r--r--opcodes/iq2000-ibld.c8
-rw-r--r--opcodes/lm32-ibld.c8
-rw-r--r--opcodes/m32c-ibld.c8
-rw-r--r--opcodes/m32r-ibld.c8
-rw-r--r--opcodes/mep-ibld.c8
-rw-r--r--opcodes/mt-ibld.c8
-rw-r--r--opcodes/or1k-ibld.c8
-rw-r--r--opcodes/xc16x-ibld.c8
-rw-r--r--opcodes/xstormy16-ibld.c8
16 files changed, 78 insertions, 60 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 1c7e4cb12d3..0cb04913b08 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,23 @@
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.
2020-09-02 Cooper Qu <cooper.qu@linux.alibaba.com>
diff --git a/opcodes/bpf-ibld.c b/opcodes/bpf-ibld.c
index 0070e410869..32260f8a188 100644
--- a/opcodes/bpf-ibld.c
+++ b/opcodes/bpf-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/cgen-ibld.in b/opcodes/cgen-ibld.in
index 7829822b2ca..b06d5c20da8 100644
--- a/opcodes/cgen-ibld.in
+++ b/opcodes/cgen-ibld.in
@@ -154,7 +154,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -192,8 +192,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -497,7 +497,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/epiphany-ibld.c b/opcodes/epiphany-ibld.c
index 27f0fabd2ae..6e594d38150 100644
--- a/opcodes/epiphany-ibld.c
+++ b/opcodes/epiphany-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/fr30-ibld.c b/opcodes/fr30-ibld.c
index 8cc70209d4f..aa5f846bc44 100644
--- a/opcodes/fr30-ibld.c
+++ b/opcodes/fr30-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/frv-ibld.c b/opcodes/frv-ibld.c
index 2a7fcb876c3..8bc69624dc0 100644
--- a/opcodes/frv-ibld.c
+++ b/opcodes/frv-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/ip2k-ibld.c b/opcodes/ip2k-ibld.c
index 18c2fed67a0..0d7b4474439 100644
--- a/opcodes/ip2k-ibld.c
+++ b/opcodes/ip2k-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/iq2000-ibld.c b/opcodes/iq2000-ibld.c
index cad26e226e3..ce0b15a57e0 100644
--- a/opcodes/iq2000-ibld.c
+++ b/opcodes/iq2000-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/lm32-ibld.c b/opcodes/lm32-ibld.c
index 48e894a9ee1..04d3c9ec0e8 100644
--- a/opcodes/lm32-ibld.c
+++ b/opcodes/lm32-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/m32c-ibld.c b/opcodes/m32c-ibld.c
index 67bfb48c0a2..228fa0d9c8c 100644
--- a/opcodes/m32c-ibld.c
+++ b/opcodes/m32c-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/m32r-ibld.c b/opcodes/m32r-ibld.c
index 8e1a7de8141..e4080ef6a57 100644
--- a/opcodes/m32r-ibld.c
+++ b/opcodes/m32r-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/mep-ibld.c b/opcodes/mep-ibld.c
index 8f03813761a..47611dd2ae3 100644
--- a/opcodes/mep-ibld.c
+++ b/opcodes/mep-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/mt-ibld.c b/opcodes/mt-ibld.c
index 924fc90cf77..bd8b545833f 100644
--- a/opcodes/mt-ibld.c
+++ b/opcodes/mt-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/or1k-ibld.c b/opcodes/or1k-ibld.c
index 576a13918b6..828aae8637f 100644
--- a/opcodes/or1k-ibld.c
+++ b/opcodes/or1k-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/xc16x-ibld.c b/opcodes/xc16x-ibld.c
index ed51a1b4fec..9b87c3b4a3a 100644
--- a/opcodes/xc16x-ibld.c
+++ b/opcodes/xc16x-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;
diff --git a/opcodes/xstormy16-ibld.c b/opcodes/xstormy16-ibld.c
index 06f036fd12e..5784b583a60 100644
--- a/opcodes/xstormy16-ibld.c
+++ b/opcodes/xstormy16-ibld.c
@@ -155,7 +155,7 @@ insert_normal (CGEN_CPU_DESC cd,
/* 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)
@@ -193,8 +193,8 @@ insert_normal (CGEN_CPU_DESC cd,
{
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)
{
@@ -498,7 +498,7 @@ extract_normal (CGEN_CPU_DESC cd,
value &= mask;
/* sign extend? */
if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
- && (value & (1L << (length - 1))))
+ && (value & (1UL << (length - 1))))
value |= ~mask;
*valuep = value;