]> www.infradead.org Git - qemu-nvme.git/commitdiff
target/openrisc: Always exit after mtspr npc
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 24 Oct 2022 12:54:15 +0000 (22:54 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 31 Oct 2022 21:31:41 +0000 (08:31 +1100)
We have called cpu_restore_state asserting will_exit.
Do not go back on that promise.  This affects icount.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/openrisc/sys_helper.c

index 09b3c97d7c1ac408e5852ddc1d723c938c3e6e2f..a3508e421def4ad5a5e8801d33d9a814f4a62454 100644 (file)
@@ -51,8 +51,8 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, target_ulong rb)
         if (env->pc != rb) {
             env->pc = rb;
             env->dflag = 0;
-            cpu_loop_exit(cs);
         }
+        cpu_loop_exit(cs);
         break;
 
     case TO_SPR(0, 17): /* SR */