Skip to contentSkip to conversation

[5196] Write zeros to high bits of y, based on patch by Vince Weaver

Qemu-devel Blue Swirl 1 participant 1 message Sep 11, 2008

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 5196

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5196
Author:   blueswir1
Date:     2008-09-11 16:01:02 +0000 (Thu, 11 Sep 2008)

Log Message:
-----------
Write zeros to high bits of y, based on patch by Vince Weaver

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

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

target-sparc/translate.c +4 -2
@@ -709,7 +709,8 @@
     tcg_gen_andi_tl(r_temp, cpu_cc_src, 0x1);
     tcg_gen_shli_tl(r_temp, r_temp, 31);
     tcg_gen_shri_tl(cpu_tmp0, cpu_y, 1);
-    tcg_gen_or_tl(cpu_y, cpu_tmp0, r_temp);
+    tcg_gen_or_tl(cpu_tmp0, cpu_tmp0, r_temp);
+    tcg_gen_andi_tl(cpu_y, cpu_tmp0, 0xffffffff);
 
     // b1 = N ^ V;
     gen_mov_reg_N(cpu_tmp0, cpu_psr);
@@ -3195,7 +3196,8 @@
                         {
                             switch(rd) {
                             case 0: /* wry */
-                                tcg_gen_xor_tl(cpu_y, cpu_src1, cpu_src2);
+                                tcg_gen_xor_tl(cpu_tmp0, cpu_src1, cpu_src2);
+                                tcg_gen_andi_tl(cpu_y, cpu_tmp0, 0xffffffff);
                                 break;
 #ifndef TARGET_SPARC64
                             case 0x01 ... 0x0f: /* undefined in the