diff options
author | Alan Modra <amodra@gmail.com> | 2020-01-09 06:44:16 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-01-10 17:32:33 +1030 |
commit | 8948cc6971fb82feffc49e2d21747111466ad642 (patch) | |
tree | c71b8b40324ce83b2fb5396f2134f21169da1b21 /include/ChangeLog | |
parent | 71780f455fbf35ed4c48e94b4228c55c11a213c8 (diff) | |
download | binutils-gdb-8948cc6971fb82feffc49e2d21747111466ad642.tar.gz |
ubsan: spu: left shift of negative value
Also fixes a real bug. The DECODE_INSN_I9a and DECODE_INSN_I9b both
use UNSIGNED_EXTRACT for 7 low bits of the result, but this was an
unsigned value due to "insn" being unsigned. DECODE_INSN_I9* is
therefore unsigned too, leading to a zero extension in an expression
using a bfd_vma if bfd_vma is 64 bits.
* opcode/spu.h: Formatting.
(UNSIGNED_EXTRACT): Use 1u.
(SIGNED_EXTRACT): Don't sign extend with shifts.
(DECODE_INSN_I9a, DECODE_INSN_I9b): Avoid left shift of signed value.
Keep result signed.
(DECODE_INSN_U9a, DECODE_INSN_U9b): Delete.
Diffstat (limited to 'include/ChangeLog')
-rw-r--r-- | include/ChangeLog | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index cd0410494d8..91765c5be61 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,12 @@ +2020-01-10 Alan Modra <amodra@gmail.com> + + * opcode/spu.h: Formatting. + (UNSIGNED_EXTRACT): Use 1u. + (SIGNED_EXTRACT): Don't sign extend with shifts. + (DECODE_INSN_I9a, DECODE_INSN_I9b): Avoid left shift of signed value. + Keep result signed. + (DECODE_INSN_U9a, DECODE_INSN_U9b): Delete. + 2020-01-07 Shahab Vahedi <shahab@synopsys.com> * opcode/arc.h (insn_class_t): Add 'LLOCK' and 'SCOND'. |