mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
ubsan: crx: left shift cannot be represented in type 'int'
* crx-dis.c (match_opcode): Avoid shift left of signed value.
This commit is contained in:
parent
2e98c6c5c5
commit
2c5c119630
@ -1,3 +1,7 @@
|
||||
2020-01-04 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* crx-dis.c (match_opcode): Avoid shift left of signed value.
|
||||
|
||||
2020-01-04 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* d30v-dis.c (print_insn): Avoid signed overflow in left shift.
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user