Replaced my implmenetation of FXTRACT with TC1995's.
This commit is contained in:
@@ -36,12 +36,19 @@ opFNOP(uint32_t fetchdat)
|
|||||||
static int
|
static int
|
||||||
opFXTRACT(uint32_t fetchdat)
|
opFXTRACT(uint32_t fetchdat)
|
||||||
{
|
{
|
||||||
double_decompose_t temp = (double_decompose_t) ST(0);
|
x87_conv_t test;
|
||||||
|
int64_t exp80, exp80final;
|
||||||
|
double mant;
|
||||||
|
|
||||||
FP_ENTER();
|
FP_ENTER();
|
||||||
cpu_state.pc++;
|
cpu_state.pc++;
|
||||||
ST(0) = (double) temp.exponent;
|
test.eind.d = ST(0);
|
||||||
x87_push((double) temp.mantissa);
|
exp80 = test.eind.ll & (0x7ff0000000000000ll);
|
||||||
|
exp80final = (exp80 >> 52) - BIAS64;
|
||||||
|
mant = test.eind.d / (pow(2.0, (double)exp80final));
|
||||||
|
ST(0) = (double)exp80final;
|
||||||
|
FP_TAG_VALID;
|
||||||
|
x87_push(mant);
|
||||||
CLOCK_CYCLES_FPU((fpu_type >= FPU_487SX) ? (x87_timings.fxtract) : (x87_timings.fxtract * cpu_multi));
|
CLOCK_CYCLES_FPU((fpu_type >= FPU_487SX) ? (x87_timings.fxtract) : (x87_timings.fxtract * cpu_multi));
|
||||||
CONCURRENCY_CYCLES((fpu_type >= FPU_487SX) ? (x87_concurrency.fxtract) : (x87_concurrency.fxtract * cpu_multi));
|
CONCURRENCY_CYCLES((fpu_type >= FPU_487SX) ? (x87_concurrency.fxtract) : (x87_concurrency.fxtract * cpu_multi));
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user