Skip to contentSkip to conversation

[5085] Fix udiv and sdiv on Sparc64 (Vince Weaver)

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

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 5085

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5085
Author:   blueswir1
Date:     2008-08-25 19:43:53 +0000 (Mon, 25 Aug 2008)

Log Message:
-----------
Fix udiv and sdiv on Sparc64 (Vince Weaver)

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

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

target-sparc/op_helper.c +2 -2
@@ -2288,7 +2288,7 @@
     uint64_t x0;
     uint32_t x1;
 
-    x0 = a | ((uint64_t) (env->y) << 32);
+    x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32);
     x1 = b;
 
     if (x1 == 0) {
@@ -2310,7 +2310,7 @@
     int64_t x0;
     int32_t x1;
 
-    x0 = a | ((int64_t) (env->y) << 32);
+    x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32);
     x1 = b;
 
     if (x1 == 0) {