aboutsummaryrefslogtreecommitdiff
path: root/opcodes/crx-dis.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-01-03 07:07:17 +1030
committerAlan Modra <amodra@gmail.com>2020-01-04 19:20:33 +1030
commit2c5c119630be063c97872428084fff51a858dfd3 (patch)
treeb62cdd670b62aef25489b8bf9b60b0abe01c089d /opcodes/crx-dis.c
parent2e98c6c5c5a0d8746f3815ceeb7564acaa0645e1 (diff)
downloadfsf-binutils-gdb-2c5c119630be063c97872428084fff51a858dfd3.zip
fsf-binutils-gdb-2c5c119630be063c97872428084fff51a858dfd3.tar.gz
fsf-binutils-gdb-2c5c119630be063c97872428084fff51a858dfd3.tar.bz2
ubsan: crx: left shift cannot be represented in type 'int'
* crx-dis.c (match_opcode): Avoid shift left of signed value.
Diffstat (limited to 'opcodes/crx-dis.c')
-rw-r--r--opcodes/crx-dis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/crx-dis.c b/opcodes/crx-dis.c
index 18b6c6d..011cd68 100644
--- a/opcodes/crx-dis.c
+++ b/opcodes/crx-dis.c
@@ -337,7 +337,7 @@ match_opcode (void)
unsigned int mask;
/* The instruction 'constant' opcode doewsn't exceed 32 bits. */
- unsigned int doubleWord = (words[1] + (words[0] << 16)) & 0xffffffff;
+ unsigned int doubleWord = words[1] + ((unsigned) words[0] << 16);
/* Start searching from end of instruction table. */
instruction = &crx_instruction[NUMOPCODES - 2];