ubsan: tc-mips.c:9606 shift exponent 32 is too large
* config/tc-mips.c (load_register): Avoid too large shift.
This commit is contained in:
parent
602e9f0ae7
commit
7697028a6c
@ -1,3 +1,7 @@
|
||||
2020-09-02 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* config/tc-mips.c (load_register): Avoid too large shift.
|
||||
|
||||
2020-09-02 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* config/tc-d30v.c (parallel_ok): Use 1UL for left shift expression.
|
||||
|
||||
@ -9603,8 +9603,11 @@ load_register (int reg, expressionS *ep, int dbl)
|
||||
lo >>= 1;
|
||||
++bit;
|
||||
}
|
||||
lo |= (hi & (((unsigned long) 1 << bit) - 1)) << (32 - bit);
|
||||
hi >>= bit;
|
||||
if (bit != 0)
|
||||
{
|
||||
lo |= (hi & ((2UL << (bit - 1)) - 1)) << (32 - bit);
|
||||
hi >>= bit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user