mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-24 01:51:54 +08:00
PR26509 UBSAN: tc-z80.c:3656 shift exponent is too large
PR 26509 * config/tc-z80.c (is_overflow): Use 1UL in mask shift expression.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2020-08-31 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 26509
|
||||||
|
* config/tc-z80.c (is_overflow): Use 1UL in mask shift expression.
|
||||||
|
|
||||||
2020-08-30 Alan Modra <amodra@gmail.com>
|
2020-08-30 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* config/tc-tic4x.c (tic4x_gen_to_words): Rewrite mantissa
|
* config/tc-tic4x.c (tic4x_gen_to_words): Rewrite mantissa
|
||||||
|
@ -3653,7 +3653,7 @@ md_assemble (char *str)
|
|||||||
static int
|
static int
|
||||||
is_overflow (long value, unsigned bitsize)
|
is_overflow (long value, unsigned bitsize)
|
||||||
{
|
{
|
||||||
long fieldmask = (1 << bitsize) - 1;
|
long fieldmask = (1UL << bitsize) - 1;
|
||||||
long signmask = ~fieldmask;
|
long signmask = ~fieldmask;
|
||||||
long a = value & fieldmask;
|
long a = value & fieldmask;
|
||||||
long ss = a & signmask;
|
long ss = a & signmask;
|
||||||
|
Reference in New Issue
Block a user