diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-03-17 16:00:34 +0000 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-03-27 19:22:49 +0400 |
commit | f45cb2f43f5bb0a4122a64e61c746048b59a84ed (patch) | |
tree | 65b2d220048908395dfca31fdea9ef683d01bf88 /target-mips/op_helper.c | |
parent | d9631b90da6ac592ea76b41a654dd5d29b2645d4 (diff) |
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>
Diffstat (limited to 'target-mips/op_helper.c')
-rw-r--r-- | target-mips/op_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index e56f038d71..4edec6c617 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -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) |