From 602e9f0ae74cb349005d259ae50527fb72803f54 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 2 Sep 2020 10:17:21 +0930 Subject: [PATCH] ubsan: tc-d30v.c left shift cannot be represented * config/tc-d30v.c (parallel_ok): Use 1UL for left shift expression. --- gas/ChangeLog | 4 ++++ gas/config/tc-d30v.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index f6b9e45a527..052c9541ff9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2020-09-02 Alan Modra + + * config/tc-d30v.c (parallel_ok): Use 1UL for left shift expression. + 2020-09-02 Alan Modra * config/rx-parse.y (rx_intop): Avoid too large shifts. diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c index 9f0b0eb473c..c24dfacd05b 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; } } } -- 2.30.2