ubsan: bfin-dis.c:160 shift exponent 32 is too large
Alan Modra
amodra@gmail.com
Wed Sep 2 08:42:57 GMT 2020
More information about the Binutils mailing list
Wed Sep 2 08:42:57 GMT 2020
- Previous message (by thread): ubsan: expr.c:1725,1741 signed integer overflow
- Next message (by thread): ubsan: *-ibld.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
* bfin-dis.c (MASKBITS): Use SIGNBIT. diff --git a/opcodes/bfin-dis.c b/opcodes/bfin-dis.c index 4f66f12e3c..3eb6087a3c 100644 --- a/opcodes/bfin-dis.c +++ b/opcodes/bfin-dis.c @@ -34,7 +34,7 @@ typedef long TIword; #define SIGNBIT(bits) (1ul << ((bits) - 1)) -#define MASKBITS(val, bits) ((val) & ((1ul << (bits)) - 1)) +#define MASKBITS(val, bits) ((val) & ((SIGNBIT (bits) << 1) - 1)) #define SIGNEXTEND(v, n) ((MASKBITS (v, n) ^ SIGNBIT (n)) - SIGNBIT (n)) #include "disassemble.h" -- Alan Modra Australia Development Lab, IBM
- Previous message (by thread): ubsan: expr.c:1725,1741 signed integer overflow
- Next message (by thread): ubsan: *-ibld.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list