提交 09487205 编写于 作者: I Igor V. Kovalenko 提交者: Blue Swirl

sparc64: fix udiv and sdiv insns

- truncate second operand to 32bit
Signed-off-by: NIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 0e2fa9ca
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册