Pre-calculate pow table for FXTRACT instruction

This commit is contained in:
Cacodemon345
2025-03-20 21:52:48 +06:00
parent 00c97dac1c
commit a9c97abfb6
4 changed files with 14 additions and 1 deletions

View File

@@ -46,7 +46,7 @@ opFXTRACT(UNUSED(uint32_t fetchdat))
test.eind.d = ST(0);
exp80 = test.eind.ll & 0x7ff0000000000000LL;
exp80final = (exp80 >> 52) - BIAS64;
mant = test.eind.d / (pow(2.0, (double) exp80final));
mant = test.eind.d / exp_pow_table[exp80 >> 52];
ST(0) = (double) exp80final;
FP_TAG_VALID;
x87_push(mant);