From f45cb2f43f5bb0a4122a64e61c746048b59a84ed Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 17 Mar 2014 16:00:34 +0000 Subject: 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 Signed-off-by: Michael Tokarev --- target-mips/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-mips/op_helper.c') 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) -- cgit v1.2.3