From: bellard Date: Mon, 23 Oct 2006 21:37:34 +0000 (+0000) Subject: wrwim insn fix (Paul Robinson) X-Git-Tag: release_0_9_1~1695 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b8dca93e4aae14a085d10e286a4296b65bd7543a;p=qemu-xen-4.6-testing.git wrwim insn fix (Paul Robinson) --- diff --git a/target-sparc/op.c b/target-sparc/op.c index 7ea209ea8..1ec15d28b 100644 --- a/target-sparc/op.c +++ b/target-sparc/op.c @@ -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(); diff --git a/target-sparc/translate.c b/target-sparc/translate.c index a522d778b..455dd171e 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -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;