]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - linux-user/main.c
target-sparc: Don't compute full flags value so often
[thirdparty/qemu.git] / linux-user / main.c
index 9f3476ba5739a0a366928a9865852d31f5d57445..f4bbe697f78862d565751cbae22cd7bdbc7b2ddb 100644 (file)
@@ -1114,6 +1114,11 @@ void cpu_loop (CPUSPARCState *env)
     while (1) {
         trapnr = cpu_sparc_exec (env);
 
+        /* Compute PSR before exposing state.  */
+        if (env->cc_op != CC_OP_FLAGS) {
+            cpu_get_psr(env);
+        }
+
         switch (trapnr) {
 #ifndef TARGET_SPARC64
         case 0x88: