This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ubsan: tic4x: left shift cannot be represented in type 'int'
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 30 Jan 2020 17:11:58 +1030
- Subject: ubsan: tic4x: left shift cannot be represented in type 'int'
The patch also fixes a case where libopcodes built for a 64-bit
bfd_vma may print different results to libopcodes built for a 32-bit
bfd_vma.
* tic4x-dis.c (tic4x_dp): Make unsigned.
diff --git a/opcodes/tic4x-dis.c b/opcodes/tic4x-dis.c
index 33d75c878b..a99b52a7ad 100644
--- a/opcodes/tic4x-dis.c
+++ b/opcodes/tic4x-dis.c
@@ -52,7 +52,7 @@ typedef enum
indirect_t;
static unsigned long tic4x_version = 0;
-static int tic4x_dp = 0;
+static unsigned int tic4x_dp = 0;
static tic4x_inst_t **optab = NULL;
static tic4x_inst_t **optab_special = NULL;
static const char *registernames[REG_TABLE_SIZE];
--
Alan Modra
Australia Development Lab, IBM