Ryan Houdek
bef4e2ff01
Fixes HSUB unit tests
...
I had the values reversed from what was expected.
Changed to reflect what changed in the previous commit.
Confirmed by host unit test runner
2020-09-23 00:32:28 -07:00
Ryan Houdek
d425aa4f49
Fixes the HSUB ops
...
These were swizzling in the wrong direction.
Confirmed by host runner
2020-09-23 00:31:39 -07:00
Stefanos Kornilios Mitsis Poiitidis
e168e5053a
Merge pull request #410 from Sonicadvance1/pmovmskb
...
Implements MMX PMOVMSKB
2020-09-23 09:51:48 +03:00
Stefanos Kornilios Mitsis Poiitidis
91bea781f4
Merge pull request #408 from Sonicadvance1/rounding_mode_host
...
Adds new IR ops for supporting host rounding mode conversion
2020-09-23 09:50:37 +03:00
Stefanos Kornilios Mitsis Poiitidis
75109050c0
Merge pull request #409 from Sonicadvance1/maskmov
...
Implements MASKMOVQ and MASKMOVDQU
2020-09-23 09:49:20 +03:00
Ryan Houdek
4b35cf3c3e
Merge pull request #405 from Sonicadvance1/HostRunner
...
Implements x86 host runner
2020-09-22 23:36:33 -07:00
Ryan Houdek
f01f3053f5
Merge pull request #407 from Sonicadvance1/remove_undefined_behaviour
...
Removes undefined behaviour in our unit tests
2020-09-22 23:32:17 -07:00
Ryan Houdek
8a62065917
Implements new unit tests for these instructions
2020-09-22 23:23:51 -07:00
Ryan Houdek
74e2f189f1
Implements MASKMOVQ and MASKMOVDQU
...
Without supporting phis this entire loop needs to be unrolled.
I just found out while reading the x86 documentation that this
instruction is explicitly a weakly ordered memory operation.
So this operation can be changed over to a couple vector conditional
loadstores soon after merging
2020-09-22 23:23:51 -07:00
Ryan Houdek
3ad8ea49e4
Implements PMOVMSKB unit test
2020-09-22 23:23:06 -07:00
Ryan Houdek
88a545cea5
Implements MMX PMOVMSKB
...
Only pulls out 8 bits of data then zero extends the result to 32bits for
the GPR
2020-09-22 23:23:06 -07:00
Ryan Houdek
faa7a16655
Merge pull request #411 from Sonicadvance1/problematic_unittests
...
Disables problematic posix tests
2020-09-22 23:22:46 -07:00
Ryan Houdek
cb525e4a59
Implements x86 host runner
...
Will be used for unit tests
2020-09-22 23:19:48 -07:00
Ryan Houdek
820d83f158
Disables problematic posix tests
2020-09-22 23:15:19 -07:00
Stefanos Kornilios Mitsis Poiitidis
f0431a8ff4
Merge pull request #406 from Sonicadvance1/fix_ir_printer_crash
...
Fixes crash when SSA value has size of zero
2020-09-23 09:06:33 +03:00
Ryan Houdek
394f20d2c8
Implements the new IR ops in the x86 JIT
2020-09-22 18:46:04 -07:00
Ryan Houdek
6da5071433
Implements the new IR ops in the Arm64 JIT
2020-09-22 18:45:16 -07:00
Ryan Houdek
e84e65d246
Implements new IR ops in the interpreter
2020-09-22 18:43:40 -07:00
Ryan Houdek
e4182108f6
Adds new IR ops for supporting host rounding mode conversion
2020-09-22 18:42:23 -07:00
Ryan Houdek
0c7c7ba670
Removes undefined behaviour in our unit tests
...
Most of these were relying on the upper 16bits of the 80bit MM registers
to be zero.
This isn't necessarily true as one will find out when running this under
the host runner.
2020-09-22 18:32:19 -07:00
Ryan Houdek
adb9b111ca
Fixes crash when SSA value has size of zero
...
In the case of an invalid SSA destination size, the IR validation pass
would catch it and then when printing the IR it would crash with a
divide by zero.
Fixes that.
2020-09-22 18:20:32 -07:00
Ryan Houdek
bad3b7da0c
Merge pull request #403 from FEX-Emu/skmp/libsdl2-loadfns
...
libSDL2: SDL_LoadObject/Function/UnloadObject should be implemented in guest context
2020-09-22 16:24:25 -07:00
Stefanos Kornilios Mitsis Poiitidis
ca563c42d4
libSDL2: SDL_LoadObject/Function/UnloadObject should be implemented in guest context
2020-09-23 02:19:15 +03:00
Stefanos Kornilios Mitsis Poiitidis
98909af0f7
Merge pull request #402 from Sonicadvance1/fix_bt_tests
...
Fixes incorrect assuming BT tests
2020-09-23 01:56:30 +03:00
Stefanos Kornilios Mitsis Poiitidis
43dfb6c363
Merge pull request #401 from Sonicadvance1/frontend_signal_handler
...
Adds ability for the frontend to register a signal handler
2020-09-23 01:45:15 +03:00
Stefanos Kornilios Mitsis Poiitidis
9e91310a62
Merge pull request #400 from Sonicadvance1/test_exec
...
Ensures the unit test code is marked executable
2020-09-23 01:43:28 +03:00
Stefanos Kornilios Mitsis Poiitidis
f6a8f96fbd
Merge pull request #399 from Sonicadvance1/unittest_reg_size
...
Allows unit tests registers to have partial register views
2020-09-23 01:42:33 +03:00
Stefanos Kornilios Mitsis Poiitidis
b015a58704
Merge pull request #398 from Sonicadvance1/compile_arg
...
Ensures architeecture define is defined in the root cmake
2020-09-23 01:35:59 +03:00
Ryan Houdek
c39781275f
Merge pull request #396 from FEX-Emu/skmp/execve-only-existing-files
...
syscalls: execve should fail on missing files
2020-09-22 15:25:08 -07:00
Stefanos Kornilios Mitsis Poiitidis
a8a0a270f6
Syscalls: Execve should fail for not existing files
2020-09-23 01:22:14 +03:00
Ryan Houdek
fe3028d5b5
Merge pull request #323 from FEX-Emu/skmp/callbacks
...
Thunks: Initial Callback support
2020-09-22 14:18:12 -07:00
Ryan Houdek
78ad2e4781
Fixes incorrect assuming BT tests
...
66 prefix /does/ change behaviour because that is the operand size
prefix.
Additionally the immediate variant will also modulo the result.
So that needs to be checked for
Confirmed with manual on upcoming host-side unit test runner
2020-09-22 14:05:26 -07:00
Ryan Houdek
de2a165a7d
Adds ability for the frontend to register a signal handler
...
This will come to be useful for our host code execution and wine in the
future
2020-09-22 13:19:41 -07:00
Ryan Houdek
5c32bac737
Ensures the unit test code is marked executable
...
This will become important in the future when we are actually executing
this code directly on host.
FEX itself doesn't yet care about memory permissions
2020-09-22 13:14:04 -07:00
Ryan Houdek
eb35df0b68
Allows unit tests registers to have partial register views
...
This allows us to only check for the lower 64bits of the MM registers
when doing MMX ops for example.
Top 16bits in that case is undefined and needs to be ignored
2020-09-22 13:10:12 -07:00
Ryan Houdek
c0ce5a3101
Ensures architeecture define is defined in the root cmake
2020-09-22 13:05:42 -07:00
Ryan Houdek
15b5eae875
Merge pull request #397 from FEX-Emu/skmp/add-iret
...
x86-64: Implement IRET for wine
2020-09-22 13:00:54 -07:00
Stefanos Kornilios Mitsis Poiitidis
c9ca333dc8
ThunkLibs: Add README.md
2020-09-22 14:48:26 +03:00
Stefanos Kornilios Mitsis Poiitidis
2425ab994b
Thunks: Generation script refactor, generic callbacks
2020-09-22 14:35:38 +03:00
Stefanos Kornilios Mitsis Poiitidis
b921c83347
Merge pull request #395 from Sonicadvance1/force_unified_unittests
...
Fixes CASP IR op on interpreter when unified memory is enabled
2020-09-21 14:01:15 +03:00
Stefanos Kornilios Mitsis Poiitidis
23a4e83ba2
x86-64: Implement IRET for wine
2020-09-21 13:42:07 +03:00
Ryan Houdek
672be71903
Forces FEXLoader to use unified memory
...
The non-unified memory path is completely untested and broken now with
the ELFLoader.
Just not allow it now
2020-09-17 15:39:52 -07:00
Ryan Houdek
22e658e36d
Foces the test harness runner to use unified memory
...
All the previous fixed offset problems are now fixed so we can flick
this on.
We still allocate memory regions at fixed addresses, but due to
enforcing pie this is fine.
2020-09-17 15:38:40 -07:00
Ryan Houdek
5bd02fb003
Fixes CASP IR op on interpreter when unified memory is enabled
...
Noticed by Stef on 09/09/2020 as a curious code block that was failing
Forgot about it until now since we couldn't see exactly where it was
wrong
Code block was mixing x87 (Which forces a fallback to Interpreter) and
cmpxchg8b, which caused that code block to fail.
Since this op was broken with Unified Memory + Interpreter it wasn't
picked up by unit tests since those don't run in unified memory
2020-09-17 15:35:56 -07:00
Stefanos Kornilios Mitsis Poiitidis
2cb8db0abb
Merge pull request #394 from Sonicadvance1/fix_addr_size_override
...
Fixes address size override prefix
2020-09-17 10:00:36 +03:00
Scott Mansell
3a22cec90e
Merge pull request #374 from Sonicadvance1/more_reentrant_fixes
...
Removes a couple of unnecessary variables to improve reentrancy chances
2020-09-17 17:41:25 +12:00
Ryan Houdek
e194aa28e4
Removes a couple of unnecessary variables to improve reentrancy chances
...
We still aren't 100% reentrant safe in the case that the cores are
interrupted while running, but this is a step in the right direction
2020-09-16 22:34:21 -07:00
Ryan Houdek
00f0047cff
Merge pull request #391 from phire/Remove_BFE
...
Remove unneeded BFEs around flag generation code.
2020-09-16 22:27:59 -07:00
Scott Mansell
5269947e16
UnitTests: check INC/DEC overflow flags
2020-09-17 17:15:23 +12:00
Scott Mansell
5048753e37
Undo limitation of ASHR to 32/64bit
...
This should really be done later in a sperate PR.
1. We don't have proper unit test coverage
2. I still didn't get this right at time of removal
3. I haven't done the jit changes to go along with this.
2020-09-17 16:26:41 +12:00