[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 7/8] sparc64: fix udiv and sdiv insns
From: |
Igor V. Kovalenko |
Subject: |
[Qemu-devel] [PATCH 7/8] sparc64: fix udiv and sdiv insns |
Date: |
Wed, 02 Jun 2010 00:12:53 +0400 |
User-agent: |
StGit/0.15 |
From: Igor V. Kovalenko <address@hidden>
- truncate second operand to 32bit
Signed-off-by: Igor V. Kovalenko <address@hidden>
---
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 83067ae..4c5155f 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -3307,7 +3307,7 @@ target_ulong helper_udiv(target_ulong a, target_ulong b)
uint32_t x1;
x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32);
- x1 = b;
+ x1 = (b & 0xffffffff);
if (x1 == 0) {
raise_exception(TT_DIV_ZERO);
@@ -3329,7 +3329,7 @@ target_ulong helper_sdiv(target_ulong a, target_ulong b)
int32_t x1;
x0 = (a & 0xffffffff) | ((int64_t) (env->y) << 32);
- x1 = b;
+ x1 = (b & 0xffffffff);
if (x1 == 0) {
raise_exception(TT_DIV_ZERO);
- [Qemu-devel] Re: [PATCH 3/8] sparc64: fix 32bit load sign extension, (continued)
[Qemu-devel] [PATCH 4/8] sparc64: fix ldxfsr insn, Igor V. Kovalenko, 2010/06/01
[Qemu-devel] [PATCH 5/8] sparc64: use symbolic name for MMU index, Igor V. Kovalenko, 2010/06/01
[Qemu-devel] [PATCH 6/8] sparc64: improve ldf and stf insns, Igor V. Kovalenko, 2010/06/01
[Qemu-devel] [PATCH 8/8] sparc64: fix umul and smul insns, Igor V. Kovalenko, 2010/06/01
[Qemu-devel] [PATCH 7/8] sparc64: fix udiv and sdiv insns,
Igor V. Kovalenko <=
Re: [Qemu-devel] [PATCH 0/8] sparc64 fixes, Blue Swirl, 2010/06/02