Commit Graph
9533 Commits
Author SHA1 Message Date
Ryan Houdek 5efab55ea9 Removes LLVM from FEX
LLVM has too many problems with it to use it as a tiered level of JIT.
We won't be able to use it
2020-08-19 18:02:28 -07:00
Ryan Houdek e7058c8575 Removes LLVM from unit tests 2020-08-19 17:20:22 -07:00
Stefanos Kornilios Mitsis Poiitidis f2cac55ce1 Merge pull request #299 from FEX-Emu/disable_fail_fast
Disables fast fail in github workflow
2020-08-20 00:38:04 +03:00
Ryan Houdek 600a350fc9 Disables fast fail in github workflow
We want to see the output from all of our runners.
Usually the x86 runner quickly spins through things and then we never see the ARM results if that side failed.
2020-08-19 14:28:49 -07:00
Stefanos Kornilios Mitsis Poiitidis b8b227f098 Merge pull request #297 from Sonicadvance1/fix_atomicswap
Fixes a potential crash in ARM64's AtomicSwap
2020-08-20 00:05:12 +03:00
Stefanos Kornilios Mitsis Poiitidis 672d633b62 Merge pull request #296 from Sonicadvance1/remove_macroassembler
Removes usage of vixl's MacroAssembler
2020-08-20 00:04:31 +03:00
Ryan Houdek bad7cd1262 Fixes a potential crash in ARM64's AtomicSwap
When RA made the source address register be the same register as the
destination register then we could have overwritten the address with the
move.
Use a temporary until we get RA constraints in place.
2020-08-19 13:51:40 -07:00
Ryan Houdek c9b2c36ef7 Removes usage of vixl's MacroAssembler
This gives us two more volatile registers to play with
2020-08-19 12:52:37 -07:00
Stefanos Kornilios Mitsis Poiitidis 1e9d86ab09 Merge pull request #295 from Sonicadvance1/aarch64_tso2
AArch64 ~~TSO~~ SC implementation
2020-08-19 10:22:19 +03:00
Ryan Houdek d4aab8036f Fixes crash with softfloat 2020-08-18 21:00:34 +01:00
Ryan Houdek 7ab55d058a Bug fix for crash when code overran code size
This was checking the wrong code size. Needs to check the buffer code
size instead of the max code size
2020-08-18 21:00:33 +01:00
Ryan Houdek f11f0ab989 Switches to atomic loadstores for TSO implementation
Doesn't support fallback to the true TSO implementation yet
2020-08-18 21:00:33 +01:00
Ryan Houdek 7700a4d24b Adds support for guest sigprocmask
This was causing our SIGBUS handling to fail in FTL
2020-08-18 21:00:33 +01:00
Ryan Houdek 1db1a42576 Switches the OpcodeDispatcher over to using TSO IR ops
For loadstores to memory, this will use TSO ops to emulate x86
behaviour.
In the case that the source register is the stack pointer then it falls
back down to using regular loadstores. Since it is expected that stack
pointer usage will be thread specific.

With the AArch64 implementation this makes us be quite a bit closer to
being x86 TSO compliant
2020-08-13 20:49:19 +01:00
Ryan Houdek acfb38497f AArch64 TSO signal handler hookup
This patches unaligned LORegion loadstores with DMB wrapped loadstores.
This will ensure full cacheline consistency on loadstores, at the
expense of speed.

The performance can potentially be improved with "Half-barriers"
Described a bit here: https://github.com/dotnet/runtime/issues/8072

We can worry about that path after the initial implementation
2020-08-13 20:49:19 +01:00
Ryan Houdek ea3c4be9ed Implements TSO loadstore ops for the AArch64 JIT
This is the base implementation that uses LORegion loadstore
instructions to support the load/store release semantics, which these
instructions use.

Sadly these don't match the alignment requirements of x86 loadstores, so
if it was just used everywhere then it will cause alignment faults.
This means we need to catch the sigbus and backpatch the instruction to
do safe (aka expensive) TSO.

Currently this backpatch just falls back to regular loadstores
surrounded by DMB instructions.
Basically unaligned loadstores will fall back to nearly what we are
doing now, so significantly improved but not perfect.

A follow up PR will change this over to using a helper routine to be
100% safe
2020-08-12 15:24:01 -07:00
Ryan Houdek 9d19a60a70 Implements TSO memory ops on x86 JIT 2020-08-12 15:24:01 -07:00
Ryan Houdek b2182613b2 Implements TSO ops in LLVM backend
Same limitation as the interpreter side
2020-08-12 15:24:01 -07:00
Ryan Houdek 57c704c743 Implements TSO memory ops in interpreter
This won't be true TSO on ARM but it is impossible to work around sanely
here
2020-08-12 15:24:00 -07:00
Ryan Houdek b38983df35 Implements new TSO loadstore IR ops.
These need to end up being specially handled on non-x86 platforms
2020-08-12 15:24:00 -07:00
Stefanos Kornilios Mitsis Poiitidis 2ee277d1c8 Merge pull request #293 from Sonicadvance1/auto_ccache
Automatically enables ccache if the program is found
2020-08-12 19:47:59 +03:00
Stefanos Kornilios Mitsis Poiitidis cb34056f18 Merge pull request #294 from Sonicadvance1/aarch64_signals
Signals for AArch64
2020-08-12 19:47:10 +03:00
Ryan Houdek 58564c4a0c Merge pull request #292 from FEX-Emu/skmp/thunklibs
Thunklibs: Add partial X11, SDL, GL, EGL, asound, cmake integration
2020-08-11 03:33:13 -07:00
Ryan Houdek be5e5bafe9 Updates Posix test filed that change behaviour
Behaviour now doesn't match between x86-64 and AArch64 so these need to
be disabled explicitly.
Once signaling is fully polished off then they can be reenabled for
x86-64 as well
2020-08-11 00:33:50 +01:00
Ryan Houdek 448516882c Implements signal handling in the AArch64 JIT
Also removes the simulator for running on x86-64, which we can no longer
support.
2020-08-11 00:33:50 +01:00
Ryan Houdek d23b049dd0 Changes posix test timeout wrapper to use SIGKILL
Since we now capture all signals we need to be more aggressive.
2020-08-11 00:33:49 +01:00
Ryan Houdek f705baf2f0 Extends SignalDelegator duty
It needs to track guest SigAltAction and have its own definitions for
sigaction and sa_mask. sa_mask specifically is defined differently
between the kernel and glibc.

Also fixes some issues with the SignalDelegator that posix tests found
2020-08-11 00:33:49 +01:00
Ryan Houdek b4893b10db Automatically enables ccache if the program is found
This makes it easier to not forget to use this
2020-08-10 19:31:36 +01:00
Stefanos Kornilios Mitsis Poiitidis ab8c7f54ad Thunklibs: Disable SDL2 2020-08-10 10:23:31 +03:00
Stefanos Kornilios Mitsis Poiitidis 5317888428 Thunklibs: SDL2: use find_package for include dirs 2020-08-10 09:38:20 +03:00
Stefanos Kornilios Mitsis Poiitidis 4c056671ca Thunklibs: Xext doesn't need XTest 2020-08-10 09:37:31 +03:00
Stefanos Kornilios Mitsis Poiitidis 211aebcfa4 Merge pull request #286 from Sonicadvance1/interpreter_initialization_order
Creates the interpreter core just before the IR jit
2020-08-08 16:56:48 +03:00
Ryan Houdek 0c2d2cfab7 Merge pull request #288 from Sonicadvance1/sigret_x86_instruction
Declares new sigret x86 instruction and IR op
2020-08-08 06:48:37 -07:00
Ryan Houdek 26a05a467e Creates the interpreter core just before the IR jit
Arm64 IR JIT needs the interpreter to be around first to get a pointer
to it
2020-08-08 06:45:09 -07:00
Ryan Houdek f3099647a2 Declares new sigret x86 instruction and IR op
We are rebranding an x86-64 illegal instruction near VIA's old ALTINST
instruction as an instruction to handle returning from guest signals
cleanly.

If this ever collides with a new x86-64 (unlikely) then we will need to
change the instruction.
This ends up looking similar to what we will do for thunk callbacks
2020-08-08 06:42:06 -07:00
Stefanos Kornilios Mitsis Poiitidis db633b8394 Thunklibs: Add partial X11, SDL, GL, EGL, asound, cmake integration 2020-08-08 14:48:20 +03:00
Stefanos Kornilios Mitsis Poiitidis daa0e284b1 Merge pull request #290 from Sonicadvance1/guest_x86_code_section
Adds an x86 generated code helper class
2020-08-04 18:50:12 +03:00
Stefanos Kornilios Mitsis Poiitidis ab68990932 Merge pull request #291 from Sonicadvance1/asm_dispatcher_exit_fix
Allows ASM dispatcher to leave cleanly
2020-08-04 18:29:08 +03:00
Stefanos Kornilios Mitsis Poiitidis 48dd2589f2 Merge pull request #289 from Sonicadvance1/itimer
Implements getitimer and setitimer syscalls
2020-08-04 17:43:43 +03:00
Stefanos Kornilios Mitsis Poiitidis 11cf66aa7a Merge pull request #287 from Sonicadvance1/remove_bad_log
Removes a debug log
2020-08-04 17:40:10 +03:00
Stefanos Kornilios Mitsis Poiitidis b38a42bbb1 Merge pull request #285 from Sonicadvance1/export_virtual_memory_size
Allows block cache to export virtual memory size
2020-08-04 17:38:13 +03:00
Stefanos Kornilios Mitsis Poiitidis 4cc912d379 Merge pull request #284 from Sonicadvance1/output_redirect
Adds a new option for directing where debug logs go
2020-08-04 17:37:57 +03:00
Ryan Houdek 555589cbcb Allows ASM dispatcher to leave cleanly
This needs to live outside of the dispatcher to do correct threading
cleanup
2020-08-02 18:20:15 -07:00
Ryan Houdek 5b6420ae4b Implements getitimer and setitimer syscalls 2020-08-02 18:17:00 -07:00
Ryan Houdek 246e36c061 Adds an x86 generated code helper class
Just generates some context level x86 code space for our guest to jump
in to.
This is only currently used for sigret but will become more important as
we come to support vdso.
2020-08-02 18:14:47 -07:00
Ryan Houdek a9d0ecda52 Removes a debug log
I set -w on the config file while testing, so this log message is just
being annoying
2020-08-02 17:59:16 -07:00
Ryan Houdek f524162ed1 Allows block cache to export virtual memory size 2020-08-02 17:53:20 -07:00
Ryan Houdek 0ce8415e7a Adds a new option for directing where debug logs go
Not interfering with things using terminal GUIs is important.
Add an option that allows us to redirect output to a file
2020-08-02 17:50:21 -07:00
Ryan Houdek 452b37a842 Merge pull request #282 from phire/fix-flag-store-elimination
DCSE: Fix flag store elimination optimisation
2020-07-24 13:21:10 -07:00
Scott Mansell e319f038cc DCSE: minor fixes 2020-07-25 04:38:51 +12:00