This implements support for 130 of the 132 x87 ops as interpreter
fallbacks.
The two missing ops are the BCD load and BCD store instructions and can
be implemented another time.
This allows us to no longer have to rely on a libstdc++ modification to
handle their usage of long double. This instead works entirely through
using `long double` directly in the interpreter. Which will either use
real x87 on an x86 host. Or in the case of ARM devices, fall down
glibc's long double soft float path.
This doesn't necessarily need to be quick right now. It's more important
to have the compatibility improvement from this.
In the case of multiple dozens of tests running, they will end up
loading and saving the config files dozens of times.
This was causing the configuration system to load in half saved files
that were causing common crashes in the posix unit tests.
Theoretically this could have happened at any time but it looks like
with the posix unit tests added, it is just more likely to happen.
Makes it so loading the configuration file is much more robust and
verbose on failure.
Makes it so saving the config file first saves to a temporary and then
moves in to the correct location. This causes the config saving to be
atomic in a sense so the unit tests won't corrupt other processes of FEX
trying to load the config file.
As we run more threaded applications it is becoming apparent that this
needs to be fixed now.
This duplicates the FrontendDecoder and Passmanager per thread so they
no longer block each other while compiling.
Increases a bit of memory usage but completely worth it.
Adds a couple of assets in the other repeat instructions.
Jump targets were accidently inverted.
SCAS and LODS are the two repeat instructions we don't have unit tests
for.
Unit tests are forthcoming for this
Codeblock array was constantly being reallocated.
Changes the remap array over to a allocate in multiples of the alignment
size.
Was hitting a pedantic case where the compaction would hit slightly
increasing function sizes so large numbers of reallocations occured
quickly.
We already have an unmodified classification struct. Just memcpy it to
reset the state. Reduces a bunch of temporary allocations.
Also disables the CFG calculation since we aren't using it currently
The IRHeader itself contains a flag for if a block should fallback to
the interpreter.
This is necessary for the case that an IR is loaded and the Frontend
object no longer has the data necessary to know if it should do an
interpreter fallback.
This is super useful for bisecting JIT versus Intepreter failures, and
also cases where falling back to intepreter for compatibility is a lot
more simple than wiring things through the JIT (ala x87)
This isn't currently utilized, but will be once x87 work lands
This is a bit of a peculiar one, we want to ensure a single threaded
application is running on the emulator's primary thread.
This mitigates the problem that an application can do a getpid versus
gettid comparison and notice a problem.
Some games rely on getpid being the actual process ID and will spin
forever if it isn't the case.
This is also necessary for wine bringup since thread creation needs a
bit more finesse there.
Fixes#186
AArch64 redefines these four flags so they don't match between
architectures.
This is what was actually causing ls to fail, the x86 side was passing
in O_DIRECTORY which the AArch64 side was interpreting at O_DIRECT.
This made it return EINVAL