]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Fix corruption of CPSR when SCTLR.EE is set
authorJulian Brown <julian@codesourcery.com>
Mon, 7 Nov 2016 10:00:24 +0000 (10:00 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 7 Nov 2016 10:00:24 +0000 (10:00 +0000)
Fix a typo in arm_cpu_do_interrupt_aarch32 (OR'ing with ~CPSR_E
instead of CPSR_E) which meant that when we took an interrupt with
SCTLR.EE set we would corrupt the CPSR.

Signed-off-by: Julian Brown <julian@codesourcery.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/helper.c

index 25b15dc100fc8319cbd95be0020229ea040c7b10..b5b65caadf8afe1cda8d58a5065167380081549f 100644 (file)
@@ -6438,7 +6438,7 @@ static void arm_cpu_do_interrupt_aarch32(CPUState *cs)
     /* Set new mode endianness */
     env->uncached_cpsr &= ~CPSR_E;
     if (env->cp15.sctlr_el[arm_current_el(env)] & SCTLR_EE) {
-        env->uncached_cpsr |= ~CPSR_E;
+        env->uncached_cpsr |= CPSR_E;
     }
     env->daif |= mask;
     /* this is a lie, as the was no c1_sys on V4T/V5, but who cares