Hendiadyoin1
83f50a1507
UserspaceEmulator: Raise an error on FPU stack underflow
...
Accessing an unset part of the FPU stack should not be a simple warning,
but should trigger the FPU exception mechanism.
2021-11-07 22:42:23 +00:00
Hendiadyoin1
0d6d780183
UserspaceEmulator: Remove some unnecessary casting
2021-11-07 22:42:23 +00:00
Hendiadyoin1
d759175767
UserspaceEmulator: Stop overriding flags in FCOMI
...
We no longer override the flags we just set. We now also unset of, af,
and sf after the comparison.
This fixes the asin function for LibM!
2021-11-07 22:42:23 +00:00
Hendiadyoin1
f2eff767a0
UserspaceEmulator: Fix typos in SoftFPU.[cpp|h]
2021-11-07 22:42:23 +00:00
Hendiadyoin1
5d2a4bd18d
UserspaceEmulator: Check the right flags in FCMOV
...
Also make FCMOVNB do an actual CMOV and not a copy of FILD_m32
2021-11-07 22:42:23 +00:00
Hendiadyoin1
8108aaca39
UserspaceEmulator: Correct FSCALES rounding
...
We were rounding the wrong way, FSCALE is supposed to trunc internally,
while we were flooring.
Now LibM exponentials and related tests work :^)
2021-11-07 22:42:23 +00:00
Hendiadyoin1
fa02b46295
UserspaceEmulator: Always set C1 when rounding
2021-11-07 22:42:23 +00:00
Hendiadyoin1
7214b08f81
UserspaceEmulator: Simplify the definition of the FPU register stack
...
Long doubles are always at least 80 bits wide in memory and it suffices
if we can address these 80 bits, to mark the long double as NAN at the
end of an MMX instruction, so the additional magic using conditional
types is unnecessary.
2021-11-07 22:42:23 +00:00
Nico Weber
6c9bc18a79
Userland: Fix typos
2021-10-01 01:18:52 +01:00
Hendiadyoin1
45d0f84a27
UserspaceEmulator: Implement SoftFPU instructions
...
This implements almost all instructions related to the FPU, including
all MMX instructions as well.
A lot of these were copied and adjusted from the SoftCPU implementation.
The next big milestone would be QNan detection and ShadowValue handling.
2021-07-22 23:33:21 +02:00
Hendiadyoin1
09a1a0b319
UserspaceEmulator: Sketch out a SoftFPU interface
2021-07-22 23:33:21 +02:00