diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-25 19:43:53 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-25 19:43:53 +0000 |
commit | 7621a90da8e4c8367cb44df25dfcb4e89986fed0 (patch) | |
tree | e0ac2a569b16b32cde414cf444230867d85bbb47 | |
parent | 6676f42453b1a6b5c5e98d4795a230ffc0a783ed (diff) |
Fix udiv and sdiv on Sparc64 (Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5085 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | target-sparc/op_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index 03fe53f532..8c2551ff2c 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -2288,7 +2288,7 @@ target_ulong helper_udiv(target_ulong a, target_ulong b) 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 @@ target_ulong helper_sdiv(target_ulong a, target_ulong b) 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) { |