This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ubsan: visium: left shift cannot be represented in type 'int'


	* visium-dis.c (print_insn_visium): Avoid signed overflow.

diff --git a/opcodes/visium-dis.c b/opcodes/visium-dis.c
index 41943ade72..1f081f1a44 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];

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]