mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07:00
target-mips: Avoid shifting left into sign bit
Add U suffix to various places where we shift a 1 left by 31, to avoid undefined behaviour. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
d9631b90da
commit
f45cb2f43f
4 changed files with 17 additions and 17 deletions
|
|
@ -648,7 +648,7 @@ static void sync_c0_tcstatus(CPUMIPSState *cpu, int tc,
|
|||
{
|
||||
uint32_t status;
|
||||
uint32_t tcu, tmx, tasid, tksu;
|
||||
uint32_t mask = ((1 << CP0St_CU3)
|
||||
uint32_t mask = ((1U << CP0St_CU3)
|
||||
| (1 << CP0St_CU2)
|
||||
| (1 << CP0St_CU1)
|
||||
| (1 << CP0St_CU0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue