diff options
Diffstat (limited to 'target-sparc')
-rw-r--r-- | target-sparc/translate.c | 3 |
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 |