aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-21 17:34:42 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-21 17:34:42 +0000
commitc93e7817ee963d9441f6706d6f194ff02cec690f (patch)
tree49696e314bf82cb8212bf530a5644fdcc8189907
parent5578ceab945bd2181d220ab17462c26014f29cae (diff)
Fix wrwim masking (Luis Pureza)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5043 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--target-sparc/translate.c3
1 files changed, 3 insertions, 0 deletions
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