From c93e7817ee963d9441f6706d6f194ff02cec690f Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Thu, 21 Aug 2008 17:34:42 +0000 Subject: Fix wrwim masking (Luis Pureza) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5043 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-sparc/translate.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'target-sparc/translate.c') diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 3f15fb96a6..a6f69a150c 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -3451,6 +3451,9 @@ static void disas_sparc_insn(DisasContext * dc) } #else tcg_gen_trunc_tl_i32(cpu_tmp32, cpu_tmp0); + if (dc->def->nwindows != 32) + tcg_gen_andi_tl(cpu_tmp32, cpu_tmp32, + (1 << dc->def->nwindows) - 1); tcg_gen_st_i32(cpu_tmp32, cpu_env, offsetof(CPUSPARCState, wim)); #endif -- cgit v1.2.3