ubsan: visium: left shift cannot be represented in type 'int'
authorAlan Modra <amodra@gmail.com>
Tue, 17 Dec 2019 12:41:02 +0000 (23:11 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 17 Dec 2019 12:45:12 +0000 (23:15 +1030)
* visium-dis.c (print_insn_visium): Avoid signed overflow.

opcodes/ChangeLog
opcodes/visium-dis.c

index e2aa20b5e80bdc76b069b3309fc1e54d3dbca9d4..aac14ea6a086ba8812b7f81f1e5ec6b14b81661d 100644 (file)
@@ -1,3 +1,7 @@
+2019-12-17  Alan Modra  <amodra@gmail.com>
+
+       * visium-dis.c (print_insn_visium): Avoid signed overflow.
+
 2019-12-17  Alan Modra  <amodra@gmail.com>
 
        * aarch64-opc.c (value_fit_signed_field_p): Avoid signed overflow.
index 41943ade7264b73b2c3eae33baf93ae231c3042b..1f081f1a44c362fb898df8731e55cd3faad0f366 100644 (file)
@@ -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];
This page took 0.026053 seconds and 4 git commands to generate.