wrwim insn fix (Paul Robinson)
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 23 Oct 2006 21:37:34 +0000 (21:37 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 23 Oct 2006 21:37:34 +0000 (21:37 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2200 c046a42c-6fe2-441c-8c8c-71466251a162

target-sparc/op.c
target-sparc/translate.c

index 7ea209e..1ec15d2 100644 (file)
@@ -844,6 +844,15 @@ void OPPROTO op_wrpsr(void)
     FORCE_RET();
 }
 
+void OPPROTO op_wrwim(void)
+{
+#if NWINDOWS == 32
+    env->wim = T0;
+#else
+    env->wim = T0 & ((1 << NWINDOWS) - 1);
+#endif
+}
+
 void OPPROTO op_rett(void)
 {
     helper_rett();
index a522d77..455dd17 100644 (file)
@@ -2005,7 +2005,7 @@ static void disas_sparc_insn(DisasContext * dc)
                                goto illegal_insn;
                            }
 #else
-                           gen_op_movl_env_T0(offsetof(CPUSPARCState, wim));
+                           gen_op_wrwim();
 #endif
                         }
                         break;