Skip to contentSkip to conversation

[5043] Fix wrwim masking (Luis Pureza)

Qemu-devel Blue Swirl 1 participant 1 message Aug 21, 2008

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 5043

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5043
Author:   blueswir1
Date:     2008-08-21 17:34:42 +0000 (Thu, 21 Aug 2008)

Log Message:
-----------
Fix wrwim masking (Luis Pureza)

Modified Paths:
--------------
trunk/target-sparc/translate.c

Modified: trunk/target-sparc/translate.c
===================================================================

target-sparc/translate.c +3 -0
@@ -3451,6 +3451,9 @@
                             }
 #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