aboutsummaryrefslogtreecommitdiff
path: root/opcodes/visium-dis.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-12-17 23:11:02 +1030
committerAlan Modra <amodra@gmail.com>2019-12-17 23:15:12 +1030
commiteb7b504651ff7b44a7328cd967629d8f1d114a4b (patch)
tree7b021cbe26a117364b53b4be96b15d7f3f95d5bb /opcodes/visium-dis.c
parent29298bf66f62f2f6c1efb0685623fbc29dfade90 (diff)
downloadgdb-eb7b504651ff7b44a7328cd967629d8f1d114a4b.zip
gdb-eb7b504651ff7b44a7328cd967629d8f1d114a4b.tar.gz
gdb-eb7b504651ff7b44a7328cd967629d8f1d114a4b.tar.bz2
ubsan: visium: left shift cannot be represented in type 'int'
* visium-dis.c (print_insn_visium): Avoid signed overflow.
Diffstat (limited to 'opcodes/visium-dis.c')
-rw-r--r--opcodes/visium-dis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/visium-dis.c b/opcodes/visium-dis.c
index 41943ad..1f081f1 100644
--- a/opcodes/visium-dis.c
+++ b/opcodes/visium-dis.c
@@ -789,7 +789,7 @@ print_insn_visium (bfd_vma addr, disassemble_info *info)
/* Get 32-bit instruction word. */
FETCH_DATA (info, buffer + 4);
- ins = buffer[0] << 24;
+ ins = (unsigned) buffer[0] << 24;
ins |= buffer[1] << 16;
ins |= buffer[2] << 8;
ins |= buffer[3];