projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e2fa9c
)
sparc64: fix udiv and sdiv insns
author
Igor V. Kovalenko
<igor.v.kovalenko@gmail.com>
Tue, 1 Jun 2010 20:12:53 +0000
(
00:12
+0400)
committer
Blue Swirl
<blauwirbel@gmail.com>
Wed, 2 Jun 2010 20:07:13 +0000
(20:07 +0000)
- truncate second operand to 32bit
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-sparc/op_helper.c
patch
|
blob
|
history
diff --git
a/target-sparc/op_helper.c
b/target-sparc/op_helper.c
index 470c710755f400ec45b585334ee6a83b26a5acad..be3c1e051b5f6f12b82c28ac41b9be2c98741079 100644
(file)
--- a/
target-sparc/op_helper.c
+++ b/
target-sparc/op_helper.c
@@
-3306,7
+3306,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);
@@
-3328,7
+3328,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);