FDIVP/FDIVRP should pop the stack when a divide by zero occurs and the exception is masked. Fixes software rendering on Need for Speed III.
This commit is contained in:
parent
829c74f2d5
commit
e17a94a409
1 changed files with 3 additions and 3 deletions
|
|
@ -18,15 +18,15 @@ static int rounding_modes[4] = {FE_TONEAREST, FE_DOWNWARD, FE_UPWARD, FE_TOWARDZ
|
|||
{ \
|
||||
if (((double)src2) == 0.0) \
|
||||
{ \
|
||||
cpu_state.npxs |= STATUS_ZERODIVIDE; \
|
||||
if (cpu_state.npxc & STATUS_ZERODIVIDE) \
|
||||
cpu_state.npxs |= STATUS_ZERODIVIDE; \
|
||||
if (cpu_state.npxc & STATUS_ZERODIVIDE) \
|
||||
dst = src1 / (double)src2; \
|
||||
else \
|
||||
{ \
|
||||
pclog("FPU : divide by zero\n"); \
|
||||
picint(1 << 13); \
|
||||
return 1; \
|
||||
} \
|
||||
return 1; \
|
||||
} \
|
||||
else \
|
||||
dst = src1 / (double)src2; \
|
||||
|
|
|
|||
Loading…
Reference in a new issue