diff options
author | Alan Modra <amodra@gmail.com> | 2019-12-11 08:32:18 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-12-11 11:40:17 +1030 |
commit | 96f1f60460a87fa63c33e1004f2c98d30f686d8d (patch) | |
tree | 50f4a87e8617574b5508af7f50b3cf67ac5613c6 /opcodes | |
parent | 8c9b4171877df495a55b75365203258785da0041 (diff) | |
download | binutils-gdb-96f1f60460a87fa63c33e1004f2c98d30f686d8d.tar.gz |
ubsan: nios2: left shift cannot be represented in type 'int'
* nios2-dis.c (nios2_print_insn_arg): Use 1u << 31.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 4 | ||||
-rw-r--r-- | opcodes/nios2-dis.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 60dfe76ef12..b36a9e20361 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,9 @@ 2019-12-11 Alan Modra <amodra@gmail.com> + * nios2-dis.c (nios2_print_insn_arg): Use 1u << 31. + +2019-12-11 Alan Modra <amodra@gmail.com> + * moxie-dis.c (INST2OFFSET): Don't sign extend using shifts. 2019-12-11 Alan Modra <amodra@gmail.com> diff --git a/opcodes/nios2-dis.c b/opcodes/nios2-dis.c index 2d63eeda86d..adf0091b2a0 100644 --- a/opcodes/nios2-dis.c +++ b/opcodes/nios2-dis.c @@ -867,7 +867,7 @@ nios2_print_insn_arg (const char *argptr, case iw_L5I4X1_type: /* Encoding for push.n/pop.n. */ - reglist |= (1 << 31); + reglist |= (1u << 31); if (GET_IW_L5I4X1_FP (opcode)) reglist |= (1 << 28); if (GET_IW_L5I4X1_CS (opcode)) |