diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-02 10:17:21 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-09-02 16:30:43 +0930 |
commit | 602e9f0ae74cb349005d259ae50527fb72803f54 (patch) | |
tree | 8bdfd5dc346cf27dcf65e88a92376ca962b1f501 /gas | |
parent | 17e782e94f4dfb198d90738ffa0eeaa7276b3270 (diff) | |
download | gdb-602e9f0ae74cb349005d259ae50527fb72803f54.zip gdb-602e9f0ae74cb349005d259ae50527fb72803f54.tar.gz gdb-602e9f0ae74cb349005d259ae50527fb72803f54.tar.bz2 |
ubsan: tc-d30v.c left shift cannot be represented
* config/tc-d30v.c (parallel_ok): Use 1UL for left shift expression.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-d30v.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index f6b9e45..052c954 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ 2020-09-02 Alan Modra <amodra@gmail.com> + * config/tc-d30v.c (parallel_ok): Use 1UL for left shift expression. + +2020-09-02 Alan Modra <amodra@gmail.com> + * config/rx-parse.y (rx_intop): Avoid too large shifts. (rx_intop, rx_uintop, rx_disp3op, rx_disp5op, displacement), (rtsd_immediate): Use correctly typed unsigned variables. diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c index 9f0b0eb..c24dfac 100644 --- a/gas/config/tc-d30v.c +++ b/gas/config/tc-d30v.c @@ -862,9 +862,9 @@ parallel_ok (struct d30v_insn *op1, for (r = regno; r <= regno + z; r++) { if (r >= 32) - used_reg[j][1] |= 1L << (r - 32); + used_reg[j][1] |= 1UL << (r - 32); else - used_reg[j][0] |= 1L << r; + used_reg[j][0] |= 1UL << r; } } } |