Ryan Houdek
d5b703aaea
Adds PSLLDQ and PSRLDQ unit test
2020-03-06 09:08:25 +02:00
Ryan Houdek
1025ff75be
Makes unit tests running a bit more complex
...
Runs the unit tests with a variety of options to try and catch common
problems that crop up.
2020-03-06 09:08:25 +02:00
Ryan Houdek
d57af761de
Fixes a couple mistakes in the unit tests
2020-03-06 09:08:25 +02:00
Ryan Houdek
99dc73441c
Update project externals
2020-03-06 09:08:23 +02:00
Ryan Houdek
369686c992
Initial Commit
2020-03-06 09:08:13 +02:00
Stefanos Kornilios Mitsis Poiitidis
e9ea4cbb76
FEXCore: Move to Externals/FEXCore
2020-03-06 09:07:37 +02:00
Ryan Houdek
f034cef9fc
Fixes FindTrailingZeros IR interpreter
...
Was generating undefined behaviour when input was zero
Found via unit tests when testing TZCNT with zero input
2020-03-06 07:56:19 +02:00
Ryan Houdek
157f66bfc0
Fixes MOVSS op bug found by unit tests
...
It had failed to zext to 128bits when loading from memory
2020-03-06 07:56:19 +02:00
Ryan Houdek
9c363fb317
Various fixes that unit tests have found
...
- Need to distinguish between unsigned and signed saturating ops
- Fixes vector splat
- Fixes VUMULL/VSMULL num element calculation
- Fixes undefined behaviour in a couple of vector shift ops
- Implements VSSHR
- Fixes VExtr calculating offset correctly
- Fixes VInsGPR calculating offset correctly
- Fixes PSRA (not immediate) x86 ops
- Fixes scalar vector unary ops to correctly insert lower bits
- Fixes conversion instructions correctly inserting lower bits
- Fixes PINSRW using the wrong element size
2020-03-06 07:56:19 +02:00
Ryan Houdek
9b21caa647
Adds support for CMPPD's NEQ comparison
2020-03-06 07:56:19 +02:00
Ryan Houdek
1a7eddb49d
Fixes a bug in MOVLPD
2020-03-06 07:56:19 +02:00
Ryan Houdek
d2a1c41563
Fixes the missed BTC op instruction from the previous BT* changes
2020-03-06 07:56:19 +02:00
Ryan Houdek
cd5e34e8cc
Fixes a bunch of various bugs in the x86 translation
...
Removes a bunch of MMX instructions accidently exposed in the
opdispatcher tables.
2020-03-06 07:56:19 +02:00
Ryan Houdek
c721810516
Adds some new IR ops to the interpreter
2020-03-06 07:56:18 +02:00
Ryan Houdek
20d04b0216
Fixes some undefined behaviour with shifts in the interpreter
2020-03-06 07:56:18 +02:00
Ryan Houdek
0d870147ec
Removes syscall's FD remapper
...
Required because we can't track all FD remapping
2020-03-06 07:56:18 +02:00
Ryan Houdek
b0df2e4f18
Fixes missing MOVMSKOp class function definition
2020-03-06 07:56:18 +02:00
Ryan Houdek
ba6c542a56
Adds support for MOVMSKPS/MOVMSKPD
2020-03-06 07:56:18 +02:00
Ryan Houdek
c5dac3eff7
Fixes CMPSD x86table flag for size calculation
2020-03-06 07:56:18 +02:00
Ryan Houdek
7909b1f277
Adds UNPCKHPS instruction
2020-03-06 07:56:18 +02:00
Ryan Houdek
e67f141c29
Adds packed float comparison x86 instructions CMPPS/CMPPD
2020-03-06 07:56:18 +02:00
Ryan Houdek
9870547d50
Fixes 32bit element selection for SHUFP
2020-03-06 07:56:18 +02:00
Ryan Houdek
cde683eff4
Adds support for ancillary data in sendmsg
2020-03-06 07:56:18 +02:00
Ryan Houdek
f645bd7901
Adds a few new IR ops
...
Fixes REP CMPS. It needs to also break when ZF == 0
Fixes REPNE SCAS. It shouldn't set ZF to 0 on entry. Could result in erroneous flag setting.
Implements a few new x86 ops
2020-03-06 07:56:18 +02:00
Ryan Houdek
75f7bc0abd
Fixes FindMSB op for the interpreter for 8bit/16bit types
...
Was zexting to 32bit and thing doing a findMSB which was wrong
2020-03-06 07:56:17 +02:00
Ryan Houdek
ec5f3a6854
Fixes LEA instruction
...
LEA changes behaviour based on the ordering of the prefixes on the
instruction
eg:
66 48 8d 3d ffffffff: lea rdi, [rip - 1]
48 66 8d 3d ffffffff: lea di, [rip - 1]
So we need to know the order of a few of the prefixes.
In the future this should probably be switched to a three deep stack to
have the ordering but for now this'll do
2020-03-06 07:56:17 +02:00
Ryan Houdek
64e863a5a0
Adds a few more instructions to the OpcodeDispatcher
2020-03-06 07:56:17 +02:00
Ryan Houdek
e854112927
Implements Unified memory in the x86 JIT
2020-03-06 07:56:17 +02:00
Ryan Houdek
c336a09641
Adds new IR ops to interpreter and x86 JIT
2020-03-06 07:56:17 +02:00
Ryan Houdek
3bad1eafbc
Adds new IR ops to the JSON
2020-03-06 07:56:17 +02:00
Ryan Houdek
7359e44952
Fixes FCVTZ{U,S} Destination size
2020-03-06 07:56:17 +02:00
Ryan Houdek
fe170846f4
Fixes LEA X86Table flag
...
Default operating size was wrong
2020-03-06 07:56:17 +02:00
Ryan Houdek
ae2689d9e2
Fleshes out a couple x87 instruction table ops
2020-03-06 07:56:17 +02:00
Ryan Houdek
0dcd4bc0b3
Removes some CPUID feature flags
...
We don't support AVX512, XOP, or FMA4
2020-03-06 07:56:17 +02:00
Ryan Houdek
6f5b9358e2
Syscall additions and fixes
...
Adds unified memory support for most things
Fixes a couple of bugs
2020-03-06 07:56:17 +02:00
Ryan Houdek
8d293e9184
Adds support for unified memory to the interpreter core
2020-03-06 07:56:17 +02:00
Ryan Houdek
a79197bd39
Supports unified memory in the Core
2020-03-06 07:56:17 +02:00
Ryan Houdek
d5402bce2b
Lets the block cache understand the unified address space option
...
There is a limitation that all executable code must live above the
memory base at this moment
2020-03-06 07:56:16 +02:00
Ryan Houdek
692a93c604
Adds an optional SetMemoryBase CodeLoader function
...
This is necessary for the code loader to know where the memory base is
for unified memory
2020-03-06 07:56:16 +02:00
Ryan Houdek
0eb5e2b332
Adds unified memory option without supporting it yet
...
This allows you to set the option from the frontend but it doesn't yet
do anything.
2020-03-06 07:56:16 +02:00
Ryan Houdek
c7c5d8bdd7
Cleanup the CPUID interface
...
I saw LLVM using CPUID function 0x14 so I decided to fill out the map
with the basic leafs
2020-03-06 07:56:16 +02:00
Ryan Houdek
d2c3468cb5
Fixes accurate-std for writev
2020-03-06 07:56:16 +02:00
Ryan Houdek
ccd7a18445
Fixes a few SSE instruction flags
2020-03-06 07:56:16 +02:00
Ryan Houdek
669aa99d3e
Fixes stale data bug in the interpreter
2020-03-06 07:56:16 +02:00
Ryan Houdek
d8b3e3bd84
Adds Popcount x86 instruction to dispatcher
2020-03-06 07:56:16 +02:00
Ryan Houdek
ed12a8a242
Fixes x86 instruction decoding.
...
In the case of modrm + immediate then the immediate would end up
overwriting Src1 due to the the order of the decoding.
Changes Src1 and Src2 to an array and use a variable to index the array.
Causes a bit of code churn but fixes instruction decoding and allows
easier expansion in the future for instructions that have more sources
like AVX
2020-03-06 07:56:15 +02:00
Ryan Houdek
9135661861
Fixes edge case when instruction declares 66h and REX.W
...
REX.W takes precedence over 66h
2020-03-06 07:56:15 +02:00
Ryan Houdek
2b237d9801
Add EmulatedFiles file to cmake
2020-03-06 07:56:15 +02:00
Ryan Houdek
7e2e6fc27f
Adds basic emulated files support
...
Allows us to override some files explicitly
2020-03-06 07:56:15 +02:00
Ryan Houdek
bdda36496b
Implements FindTrailingZeros IROp in the interpreter
2020-03-06 07:56:15 +02:00