From 51bf29b1f75b811f8b398543e164798244ec9cc3 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 31 Aug 2020 15:55:20 +0930 Subject: [PATCH] PR26480 UBSAN: tc-nios2.c:1634 left shift cannot be represented PR 26480 * config/tc-nios2.c (nios2_parse_reglist): Shift 1UL left. --- gas/ChangeLog | 5 +++++ gas/config/tc-nios2.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 3f615cf8304..791a1f1812e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2020-08-31 Alan Modra + + PR 26480 + * config/tc-nios2.c (nios2_parse_reglist): Shift 1UL left. + 2020-08-31 Alan Modra PR 26479 diff --git a/gas/config/tc-nios2.c b/gas/config/tc-nios2.c index 16695c5c063..0134b15ae08 100644 --- a/gas/config/tc-nios2.c +++ b/gas/config/tc-nios2.c @@ -1631,7 +1631,7 @@ nios2_parse_reglist (char *token, const struct nios2_opcode *op) } } - mask |= 1 << regno; + mask |= 1UL << regno; last = regno; } -- 2.30.2