mirror of
https://github.com/qemu/qemu.git
synced 2024-11-27 13:53:45 +08:00
sparc64: fix udiv and sdiv insns
- truncate second operand to 32bit Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
0e2fa9cab9
commit
09487205bb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user