FSCALE should always return 0.0 if ST(0) input is 0.0, regardless of
value of ST(1); this might otherwise return infinity or NaN if not trapped. Fixes fade-in on MDK2.
This commit is contained in:
parent
0ad51dd73b
commit
2e037b5076
1 changed files with 2 additions and 1 deletions
|
|
@ -673,7 +673,8 @@ static int opFSCALE(uint32_t fetchdat)
|
||||||
cpu_state.pc++;
|
cpu_state.pc++;
|
||||||
if (fplog) pclog("FSCALE\n");
|
if (fplog) pclog("FSCALE\n");
|
||||||
temp64 = (int64_t)ST(1);
|
temp64 = (int64_t)ST(1);
|
||||||
ST(0) = ST(0) * pow(2.0, (double)temp64);
|
if (ST(0) != 0.0)
|
||||||
|
ST(0) = ST(0) * pow(2.0, (double)temp64);
|
||||||
cpu_state.tag[cpu_state.TOP&7] = TAG_VALID;
|
cpu_state.tag[cpu_state.TOP&7] = TAG_VALID;
|
||||||
CLOCK_CYCLES(x87_timings.fscale);
|
CLOCK_CYCLES(x87_timings.fscale);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue