From 8e8220177712bff17240687e60b41073bf5d85bb Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 31 Aug 2020 17:21:06 +0930 Subject: [PATCH] PR26503 UBSAN: tc-v850.c:1447 left shift cannot be represented PR 26503 * config/tc-v850.c (parse_register_list): Shift 1u left. --- gas/ChangeLog | 5 +++++ gas/config/tc-v850.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 1976c109895..8642101aea9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2020-08-31 Alan Modra + + PR 26503 + * config/tc-v850.c (parse_register_list): Shift 1u left. + 2020-08-31 Alan Modra PR 26502 diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index 865d45cc443..0ac5682935f 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; } } -- 2.30.2