Commit Graph
947 Commits
Author SHA1 Message Date
Ryan Houdek cb74beadb4 Fixes Zext on FPR->GPR conversion for AArch64
The 32bit and lower sizes were making vixl asserts fire.
Wouldn't actually change emitted code
2020-07-11 06:20:50 +01:00
Ryan Houdek d281e9f7ff Fixes LDIV bug in aarch64 JIT
vixl asserts were firing for the 16bit variant, and we needed to sext
the divisor for the 32bit variant
2020-07-11 06:20:40 +01:00
Ryan Houdek bd05a5e1de Merge pull request #266 from FEX-Emu/skmp/fix-uname
uname: Should return x86_64, not x64_64
2020-07-08 13:33:54 -07:00
Stefanos Kornilios Mitsis Poiitidis 630d66942c uname: Should return x86_64, not x64_64
Run into this in CS:GO.
With this fix it progresses much further, but still doesn't get to the menu.
2020-07-08 20:58:57 +03:00
Ryan Houdek 73729446f1 Merge pull request #265 from FEX-Emu/skmp/fix-15-byte-ops
Frontend: Fix 15-byte long opcode assert
2020-07-08 04:31:23 -07:00
Stefanos Kornilios Mitsis Poiitidis 951ff40904 Frontend: Fix 15-byte long opcode assert 2020-07-08 14:00:14 +03:00
Ryan Houdek 15d6f48ca2 Merge pull request #258 from FEX-Emu/skmp/more-syscalls
syscalls: fork, vfork, eventfd2
2020-07-06 09:51:41 -07:00
Ryan Houdek d9eadc0a3d Merge pull request #260 from FEX-Emu/skmp/implement-pavgb-pavgw
Implement PAVGB/PAVGW
2020-07-04 15:45:35 -07:00
Stefanos Kornilios Mitsis Poiitidis 560d467058 VURAvg: Fix arm64 jit 2020-07-04 21:52:15 +03:00
Stefanos Kornilios Mitsis Poiitidis 8eaa11f4f2 VURAvg: Fix llvm implementation 2020-07-04 20:51:13 +03:00
Stefanos Kornilios Mitsis Poiitidis c19e8b3d2f Implement PAVGB/PAVGW 2020-07-04 19:30:53 +03:00
Stefanos Kornilios Mitsis Poiitidis fc2d7656e0 syscalls: Warn on clone + ptrace instead of assert 2020-07-04 19:04:08 +03:00
Stefanos Kornilios Mitsis Poiitidis cb8f250078 syscalls: fork, vfork, eventfd2 2020-07-03 11:17:51 +03:00
Stefanos Kornilios Mitsis Poiitidis 82e43ad35d Merge pull request #257 from Sonicadvance1/fix_x86_crash
Fixes AtomicSwap IR op on x86
2020-07-03 09:41:11 +03:00
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