Commit Graph
9533 Commits
Author SHA1 Message Date
Ryan Houdek 9c99dbfbdc Fixes AtomicSwap IR op on x86
lock prefix needed to go before the xchg, not before the move that was
there
2020-07-02 22:18:44 -07:00
Ryan Houdek 95f1775df5 Merge pull request #255 from FEX-Emu/skmp/implement-execve
syscalls: implement execve
2020-07-02 14:41:13 -07:00
Ryan Houdek 59cc3b576e Merge pull request #256 from FEX-Emu/skmp/implement-some-syscalls
syscalls: Implement a few easy ones
2020-07-02 14:40:25 -07:00
Ryan Houdek 03e084c7f0 Merge pull request #248 from FEX-Emu/fork_syscall
clone: Some support for fork, Flag validation
2020-07-02 14:39:23 -07:00
Stefanos Kornilios Mitsis Poiitidis 370397198b syscalls: (*)get/setxattr 2020-07-02 19:46:41 +03:00
Stefanos Kornilios Mitsis Poiitidis 9c48c7f487 syscalls: truncate,creat,chown,fchown,lchown,setpgid,getpgid,setfsuid,setfsgid,getsid,sync,syncfs 2020-07-02 19:34:21 +03:00
Stefanos Kornilios Mitsis Poiitidis 8234ffce3d syscalls: implement execve 2020-07-02 18:14:28 +03:00
Stefanos Kornilios Mitsis Poiitidis 3a979ccf75 posixtests: Update disabled/passing lists 2020-07-02 15:35:24 +03:00
Stefanos Kornilios Mitsis Poiitidis 0a66654161 Merge pull request #252 from Sonicadvance1/remove_strace_compile_time
Removes syscall strace parsing if not enabled
2020-07-02 12:48:23 +03:00
Stefanos Kornilios Mitsis Poiitidis 88a9c21d2f Merge pull request #254 from Sonicadvance1/arm_support_cache_clear
Implements support for cache clearing in the ARM64 JIT
2020-07-02 09:11:56 +03:00
Ryan Houdek 4612fb5a67 Implements support for cache clearing in the ARM64 JIT
Previously the ARM64 JIT didn't support cache clearing at all.
This adds support for clearing the JIT cache while keeping dispatcher
helpers around and the ASM dispatcher alive.
2020-07-01 23:07:09 -07:00
Stefanos Kornilios Mitsis Poiitidis 285bff26b4 Merge pull request #253 from Sonicadvance1/improve_arm_compile_times
Splits JitArm64 IR handlers to a jump table
2020-07-02 08:59:27 +03:00
Ryan Houdek bb60044e12 Splits JitArm64 IR handlers to a jump table
Improves compilation time by multiple minutes
Clang was taking multiple minutes to compile JIT.cpp for ARM.
This drops it down to a handful of seconds instead.

No functional behaviour change, only movement.
JIT compile times might deviate slightly moving from a switch to a jump
table, but will be negligible in either direction.
2020-07-02 02:46:14 +01:00
Stefanos Kornilios Mitsis Poiitidis fb0701e41d Merge pull request #251 from Sonicadvance1/align_mm_regs
Corrects MM register alignment in CoreState
2020-07-01 10:52:26 +03:00
Ryan Houdek 62f9917b79 Removes syscall strace parsing if not enabled
This was spending ~60seconds of time compiling on my c630.
Something about fmt string formatting causing heavy compile times on
ARM.
Better to just compile it out anyway.
2020-07-01 06:11:35 +01:00
Ryan Houdek ce15a1bdcd Corrects MM register alignment in CoreState
This was misaligned by 8 bytes, which worked fine on x86, but crashed
when loaded on ARM.

Now it is correctly aligned to 128bit
2020-07-01 06:08:39 +01:00
Ryan Houdek e08fe4ca52 Merge pull request #247 from Sonicadvance1/fix_llvm_multiblock
Fixes LLVM multiblock
2020-06-30 09:20:41 -07:00
Stefanos Kornilios Mitsis Poiitidis 12144593d1 posixtests: Add outputs for more tests, enable tests that use fork 2020-06-30 16:23:51 +03:00
Stefanos Kornilios Mitsis Poiitidis 2ccaea7d66 clone: Validate flags, cleanup 2020-06-30 16:23:43 +03:00
Ryan Houdek 8a5813e4d0 [WIP] Fork syscall support
Bit buggy
2020-06-30 16:22:47 +03:00
Ryan Houdek a8a2a340ca Merge pull request #250 from FEX-Emu/skmp/posixtest-lists-comments
posixtests: Add support for comments in the failures/outputs/disabled lists
2020-06-30 03:19:16 -07:00
Stefanos Kornilios Mitsis Poiitidis edd6d5ec4b posixtests: Add support for comments in the failures/outputs/disabled lists 2020-06-30 13:11:45 +03:00
Ryan Houdek bd26d15879 Fixes LLVM multiblock
The break ir op is actually a block ender and it happened that in
regular code paths they were already ending the blocks correctly.

This enforces block ending in the Unimplemented op so multiblock still
generates the invalid code path correctly and it compiles.
We hit these a few times in multiblock for times in the code where it is
checking for CPU features and choosing a code path depending on CPUID
results.

Potentially these could be made in to no-ops since we'll never hit these
codepaths in practice, but it is nicer to break in case we actually do
hit one of these paths.
2020-06-26 12:31:15 -07:00
Ryan Houdek b73b585db3 Merge pull request #246 from FEX-Emu/skmp/fix-syscall-forward-macro
Syscalls/x64: Fix SYSCALL_FORWARD_ERRNO
2020-06-25 04:58:15 -07:00
Stefanos Kornilios Mitsis Poiitidis 7b7c4a9730 Syscalls/x64: Fix SYSCALL_FORWARD_ERRNO 2020-06-25 14:51:01 +03:00
Ryan Houdek eaac20d091 Merge pull request #245 from FEX-Emu/skmp/syscall-symbols-backtrace
Syscalls: Add a wrapping class for better backtrace
2020-06-25 04:41:40 -07:00
Stefanos Kornilios Mitsis Poiitidis 4e515abb33 Syscalls: Add a wrapping class for better backtrace 2020-06-25 14:29:02 +03:00
Ryan Houdek 8e95d502f3 Merge pull request #226 from FEX-Emu/skmp/add-all-syscall
Dynamic Syscall Regsistration, Automatic Strace generation
2020-06-25 03:18:43 -07:00
Stefanos Kornilios Mitsis Poiitidis 3f4150947e Posixtests: Update to fixed strftime test, renable it 2020-06-25 12:46:52 +03:00
Stefanos Kornilios Mitsis Poiitidis 8d496fb9e0 Posix Tests: Disable more sig* tests til we implement signals
These fail now as tgkill & tkill are implemented.

They pass on x86-64 because the gues handlers run natively
2020-06-24 10:30:53 +03:00
Stefanos Kornilios Mitsis Poiitidis c74518aa8a Posix Tests: Disable conformance-interfaces-strftime-2-1.test
Seems to be running into some buffer overrun w/ LANG="en_US.UTF-8" in the test machines
2020-06-24 10:13:20 +03:00
Stefanos Kornilios Mitsis Poiitidis 3190398f2b Merge pull request #242 from Sonicadvance1/ffreep_support
Implements FFREEP Instruction
2020-06-22 15:53:40 +03:00
Ryan Houdek 68fba3ffb5 Adds FFREEP unit test 2020-06-20 08:16:21 -07:00
Ryan Houdek 2bcc46c9e5 Implements FFREEP support in the OpDispatcher
There's some history for this instruction. It is not in the official
instruction documentations from AMD or Intel but it is supported on
almost every x87 supporting CPU (I think there was some Cyrix that
missed it?)

This was originally implemented by accident on the Intel 80287 CPU.
It was then periodically documented in random documentation.

The instruction behaves exactly like FFREE but then pops the stack after
the operation.
For our current implementation of FFREE, which is a NOP, we just need to
pop the stack.
2020-06-20 08:11:26 -07:00
Stefanos Kornilios Mitsis Poiitidis df1ed9442b Syscalls/x64: Add stubs for all syscalls, remove some syscall entries that are too new 2020-06-19 20:30:06 +03:00
Stefanos Kornilios Mitsis Poiitidis 7c2efe0155 Syscalls: Cleanup headers, add names, add NotImplemented 2020-06-19 13:07:07 +03:00
Stefanos Kornilios Mitsis Poiitidis 86f03d25aa syscalls: Update Known_Failures for tgkill/munlockall impls 2020-06-19 10:57:37 +03:00
Stefanos Kornilios Mitsis Poiitidis eddd3dd4ed Syscalls/x64: Cleanup and document syscall registration/forwarding logic 2020-06-19 09:45:00 +03:00
Stefanos Kornilios Mitsis Poiitidis db213f94f3 Syscalls: Implement tkill, tgkill 2020-06-18 20:18:56 +03:00
Stefanos Kornilios Mitsis Poiitidis 0bf585bf76 Syscalls: Dynamic registration, auto strace generation 2020-06-18 19:57:58 +03:00
Stefanos Kornilios Mitsis Poiitidis 620cfa0d09 Merge pull request #241 from phire/fallocate_syscall
Implement fallocate syscall
2020-06-17 15:16:01 +03:00
Scott Mansell 41635ee8be Implement fallocate syscall 2020-06-17 23:47:52 +12:00
Stefanos Kornilios Mitsis Poiitidis 0bd471448a Merge pull request #240 from Sonicadvance1/timerfd_syscalls
Implements two missing timerfd syscalls
2020-06-17 13:34:59 +03:00
Ryan Houdek 7a48d17d66 Implements two missing timerfd syscalls 2020-06-16 16:53:08 -07:00
Stefanos Kornilios Mitsis Poiitidis 0e19763045 Merge pull request #236 from Sonicadvance1/32bit_move_segments
Supports segment register moving
2020-06-16 10:47:17 +03:00
Stefanos Kornilios Mitsis Poiitidis 88d78e6664 Merge pull request #233 from Sonicadvance1/armv8_0_atomics
Implements atomic ops for ARMv8.0 devices
2020-06-16 10:46:12 +03:00
Stefanos Kornilios Mitsis Poiitidis cc2f994956 Merge pull request #237 from Sonicadvance1/32bit_opdispatcher
Supports 32bit operating mode in the OpDispatcher
2020-06-16 10:45:13 +03:00
Stefanos Kornilios Mitsis Poiitidis 06ece0402b Merge pull request #238 from Sonicadvance1/remove_debug_log
Remove a debug log from the AArch64 JIT
2020-06-16 10:43:08 +03:00
Stefanos Kornilios Mitsis Poiitidis 27cfb6b123 Merge pull request #239 from Sonicadvance1/fix_cvtps2dq
Fixes cvtps2dq instruction
2020-06-16 10:42:34 +03:00
Ryan Houdek 97fe8dbefe Adds unit test for cvtps2dq 2020-06-15 20:25:13 -07:00