Commit Graph
406 Commits
Author SHA1 Message Date
Stefanos Kornilios Mitsis Poiitidis 7c2efe0155 Syscalls: Cleanup headers, add names, add NotImplemented 2020-06-19 13:07:07 +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
Scott Mansell 41635ee8be Implement fallocate syscall 2020-06-17 23:47:52 +12: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
Ryan Houdek 2acf22f15b Fixes cvtps2dq instruction
This must of have been a copy and paste error, I didn't even have this
instruction on my list of implemented instructions.
It definitely isn't converting to a GPR
2020-06-15 20:25:13 -07:00
Ryan Houdek ea85c70daf Remove a debug log from the AArch64 JIT
These keep sneaking back in when I'm testing
2020-06-14 14:35:53 -07:00
Stefanos Kornilios Mitsis Poiitidis 77b63760be Merge pull request #235 from Sonicadvance1/32bit_remove_64bit_size
Removes 64bit size from frontend when in 32bit mode
2020-06-14 03:15:48 +03:00
Ryan Houdek fc777887f4 Supports 32bit operating mode in the OpDispatcher
Pretty basic for the most part, just changes default operating mode for
most everything from 64bit to 32bit.
2020-06-12 19:27:43 -07:00
Ryan Houdek c2bd346297 Supports segment register moving
32bit apps are setting GS register that I saw.
64Bit applications can also technically use these instructions but it
has some major limitation that causes applications to never use them
2020-06-12 18:49:29 -07:00
Ryan Houdek 5b9de1675f Removes 64bit size from frontend when in 32bit mode
64bit mode doesn't exist when we are operating in 32bit mode, so this
needs to be disabled.
This forces a fallback to a 32bit size for those ops
2020-06-12 15:19:40 -07:00
Ryan Houdek 7bfe127fcb Ensures the core saves the entry cache to the correct folder
We should store this in XDG_CACHE_HOME, not DATA_HOME.
Also fallback the HOME and PWD directories correctly
2020-06-12 15:08:16 -07:00
Ryan Houdek 53c46312ff Implements atomic ops for ARMv8.0 devices
These can only be implemented as acquire/release exclusive loops on
ARMv8.0 so they end up looking pretty disgusting.
This is more for compatibility for testing than anything. I'm not
expecting ANY ARMv8.0 device to get decent performance
2020-06-12 15:06:36 -07:00
Ryan Houdek b262b59916 Fixes up prefix handling for 32bit
Moves REX to a 64bit only table entry. This allows the missing INC/DEC
instructions to exist in 32bit space
2020-06-10 16:49:06 -07:00
Stefanos Kornilios Mitsis Poiitidis 8ca73a63cc Merge pull request #174 from Sonicadvance1/enter_inst
Enter inst
2020-06-11 00:41:18 +03:00
Stefanos Kornilios Mitsis Poiitidis 4953a620d5 Merge pull request #230 from Sonicadvance1/virtual_cores
Adds new FEX config for telling the guest how many CPU cores it can have
2020-06-08 19:34:06 +03:00
Ryan Houdek 97070ea548 Implements ENTER instruction 2020-06-06 11:52:51 -07:00
Ryan Houdek 7302ad1996 Adds new FEX config for telling the guest how many CPU cores it can have
This is just a virtual number that the guest can query through the
various means. Will affect mesa with how many helper threads it
generates at the very least
2020-06-04 00:03:41 -07:00
Ryan Houdek b25f1c4e3b Fixes a case of the BT ops failing to test the correct bit
When the `BT mem` operation was accessing memory where the bit offset
wasn't a multiple of the access size, then we were dividing the offset
by bytes and accessing bits at `mem[byteOffset] &= (BitOffset)`.
BitOffset wasn't adjusted to compensate for the access size being added
to the address.
Causing a mismatch of testing the wrong bits. Unit tests didn't capture
this.
Trying to run glxgears on i965/iris showed extensive corruption because
of it though.
2020-06-03 23:48:28 -07:00
Stefanos Kornilios Mitsis Poiitidis 2c8fccdcf2 syscalls/x64: Add fchdir 2020-06-03 16:01:06 +03:00
Ryan Houdek 7717425201 Merge pull request #224 from FEX-Emu/skmp/add-accept4
x64/syscalls: Add accept, accept4
2020-05-31 14:40:29 -07:00
Ryan Houdek efa26b3bf4 Merge pull request #223 from FEX-Emu/skmp/unhandled-syscall-show-number
x64/syscalls: Change HandleSyscall/Unimplemented Syscall to include syscall number
2020-05-31 14:39:47 -07:00
Stefanos Kornilios Mitsis Poiitidis 63ea0358bd syscalls/x64: Add pselect6 2020-05-31 15:31:16 +03:00
Stefanos Kornilios Mitsis Poiitidis 1f243f14be x64/syscalls: Add accept, accept4 2020-05-31 15:28:23 +03:00
Stefanos Kornilios Mitsis Poiitidis c200952cc6 x64/syscalls: Change HandleSyscall/Unimplemented Syscall to include syscall number 2020-05-31 14:14:10 +03:00
Stefanos Kornilios Mitsis Poiitidis f1173a3bca Merge pull request #218 from Sonicadvance1/implements_lods
Implements LODS instruction
2020-05-31 12:02:11 +03:00
Stefanos Kornilios Mitsis Poiitidis a659024547 Merge pull request #220 from Sonicadvance1/psadbw
Implements psadbw for MMX and SSE2
2020-05-31 12:00:36 +03:00
Ryan Houdek a147e5eca1 Implements psadbw for MMX and SSE2
Saw this when running Freedreno on x86-64
2020-05-31 03:22:11 +01:00
Ryan Houdek 3dae3f4b84 Fixes bug that cropped up in cvtpi2ps from previous changes 2020-05-31 03:22:11 +01:00
Ryan Houdek 2ba797a992 Implements new IR ops in the CPU backends 2020-05-31 03:22:11 +01:00
Ryan Houdek 2f1d7f70a2 Adds new IR ops that PSADBW will need 2020-05-30 18:49:09 -07:00
Ryan Houdek 111b0624ca Implements LODS instruction
Theoretically the REP case can be optimized if it is known not to fault,
but that is one legitimate use case of this instruction.
This is just to ensure that we have this instruction covered, it hasn't
been encountered in a real program yet.
2020-05-29 23:35:36 -07:00
Ryan Houdek c0711404e9 Forces LLVM backend to use the native CPU architecture
Better than relying on a hardcoded CPU target
Should fix a crash on x86 host cpus that don't support BMI1
2020-05-29 17:51:37 -07:00
Stefanos Kornilios Mitsis Poiitidis 6cc3b6b0ea Syscalls/x64: Hook up SYSCALL_MSYNC, remove fixed tests from known failures 2020-05-29 12:43:52 +03:00
Ryan Houdek 3759cbdb65 Interpreter based x87 support!
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.
2020-05-28 14:47:43 -07:00
Stefanos Kornilios Mitsis Poiitidis 8206aa0413 Add ERROR_AND_DIE, use it on unhandled syscalls 2020-05-28 18:47:24 +03:00
Ryan Houdek 1d6aac1a5d Implements two handle_at syscalls 2020-05-27 18:32:17 -07:00
Ryan Houdek c78520c526 Implements symlink syscall 2020-05-27 18:32:17 -07:00
Ryan Houdek fd857e4966 Makes threaded compilation not rely on a global mutex
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.
2020-05-27 10:18:02 -07:00
Stefanos Kornilios Mitsis Poiitidis 6669bcfffd Merge pull request #209 from Sonicadvance1/minor_opts
Minor memory allocation optimizations in the IR passes.
2020-05-27 14:27:08 +03:00
Stefanos Kornilios Mitsis Poiitidis 2fd8e617ff Merge pull request #207 from Sonicadvance1/interpreter_fallback
Adds support for interpreter fallback
2020-05-27 14:20:58 +03:00
Stefanos Kornilios Mitsis Poiitidis 22a4c5185d Merge pull request #208 from Sonicadvance1/fence_ops
Implements fence ops
2020-05-27 14:18:21 +03:00
Ryan Houdek 77e444e8a5 Fixes SCAS
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
2020-05-26 22:51:11 -07:00
Ryan Houdek b3b6727a8e Minor optimization in IRCompaction pass
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.
2020-05-26 22:25:15 -07:00
Ryan Houdek f8579d5458 Minor optimization in the RCLSE pass
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
2020-05-26 22:23:10 -07:00