mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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
1 changed files with 6 additions and 0 deletions
|
@ -926,12 +926,18 @@ void OPPROTO op_mulx_T1_T0(void)
|
|||
|
||||
void OPPROTO op_udivx_T1_T0(void)
|
||||
{
|
||||
if (T1 == 0) {
|
||||
raise_exception(TT_DIV_ZERO);
|
||||
}
|
||||
T0 /= T1;
|
||||
FORCE_RET();
|
||||
}
|
||||
|
||||
void OPPROTO op_sdivx_T1_T0(void)
|
||||
{
|
||||
if (T1 == 0) {
|
||||
raise_exception(TT_DIV_ZERO);
|
||||
}
|
||||
if (T0 == INT64_MIN && T1 == -1)
|
||||
T0 = INT64_MIN;
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue