diff options
author | Alan Modra <amodra@gmail.com> | 2020-08-31 17:21:06 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-08-31 20:28:13 +0930 |
commit | 8e8220177712bff17240687e60b41073bf5d85bb (patch) | |
tree | 5d3fd8a99a2dcccd9c70777c554abcdda18db57f | |
parent | 94f360ea2ffcee8a06cdda62df73b49c75e9a089 (diff) | |
download | gdb-8e8220177712bff17240687e60b41073bf5d85bb.zip gdb-8e8220177712bff17240687e60b41073bf5d85bb.tar.gz gdb-8e8220177712bff17240687e60b41073bf5d85bb.tar.bz2 |
PR26503 UBSAN: tc-v850.c:1447 left shift cannot be represented
PR 26503
* config/tc-v850.c (parse_register_list): Shift 1u left.
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-v850.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 1976c10..8642101 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 2020-08-31 Alan Modra <amodra@gmail.com> + PR 26503 + * config/tc-v850.c (parse_register_list): Shift 1u left. + +2020-08-31 Alan Modra <amodra@gmail.com> + PR 26502 * config/tc-tic6x.c (md_apply_fix): Use unsigned variables. diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index 865d45c..0ac5682 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -1444,7 +1444,7 @@ parse_register_list (unsigned long *insn, { if (regs[i] == exp.X_add_number) { - *insn |= (1 << i); + *insn |= 1u << i; break; } } |