mirror of https://github.com/xemu-project/xemu.git
Handle division by zero case in Sparc64 udivx and sdivx ops
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2767 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
5a1237c45f
commit
14a1120e5c
|
@ -926,12 +926,18 @@ void OPPROTO op_mulx_T1_T0(void)
|
||||||
|
|
||||||
void OPPROTO op_udivx_T1_T0(void)
|
void OPPROTO op_udivx_T1_T0(void)
|
||||||
{
|
{
|
||||||
|
if (T1 == 0) {
|
||||||
|
raise_exception(TT_DIV_ZERO);
|
||||||
|
}
|
||||||
T0 /= T1;
|
T0 /= T1;
|
||||||
FORCE_RET();
|
FORCE_RET();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPPROTO op_sdivx_T1_T0(void)
|
void OPPROTO op_sdivx_T1_T0(void)
|
||||||
{
|
{
|
||||||
|
if (T1 == 0) {
|
||||||
|
raise_exception(TT_DIV_ZERO);
|
||||||
|
}
|
||||||
if (T0 == INT64_MIN && T1 == -1)
|
if (T0 == INT64_MIN && T1 == -1)
|
||||||
T0 = INT64_MIN;
|
T0 = INT64_MIN;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue