aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/xtensa-isa.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 14aebd9..40f4b66 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,9 @@
2019-12-20 Alan Modra <amodra@gmail.com>
+ * xtensa-isa.c (xtensa_insnbuf_from_chars): Avoid signed overflow.
+
+2019-12-20 Alan Modra <amodra@gmail.com>
+
* libhppa.h (hppa_field_adjust, bfd_hppa_insn2fmt): Delete forward
declaration. Move ATTRIBUTE_UNUSED to definition.
(sign_extend, low_sign_extend, sign_unext, low_sign_unext),
diff --git a/bfd/xtensa-isa.c b/bfd/xtensa-isa.c
index 172de6f..9ddc6cd 100644
--- a/bfd/xtensa-isa.c
+++ b/bfd/xtensa-isa.c
@@ -223,7 +223,7 @@ xtensa_insnbuf_from_chars (xtensa_isa isa,
int word_inx = byte_to_word_index (i);
int bit_inx = byte_to_bit_index (i);
- insn[word_inx] |= (*cp & 0xff) << bit_inx;
+ insn[word_inx] |= (unsigned) (*cp & 0xff) << bit_inx;
}
}