Stefanos Kornilios Mitsis Poiitidis
aecea294d5
Merge pull request #792 from Sonicadvance1/implemented_unaligned_memory_ops
...
Implements unaligned atomic memory ops for ARMv8.1+
2021-02-26 12:50:06 +02:00
Ryan Houdek
ebac071ae1
Adds cmpxchg to register zext and flags unit test
2021-02-23 23:22:24 -08:00
Ryan Houdek
68db163efc
Adds cmpxchg to memory zext and flag unit test
2021-02-23 23:22:00 -08:00
Ryan Houdek
55ddc5b6e4
Adds unit tests to ensure cmpxchg flag correctness
2021-02-23 22:02:39 -08:00
Stefanos Kornilios Mitsis Poiitidis
56d10dcbbb
IR: Make OP_THUNK use an inline sha256 hash of the thunk name, update thunk scripts
2021-02-23 12:08:57 +02:00
Ryan Houdek
8a39f4b25c
Implements BTC, BTR, BTS atomic unit tests
...
This just takes the regular non-atomic unit tests and changes them to
have lock prefixes.
These are all handled as byte sized atomics so there aren't any
alignment problems.
2021-02-22 22:29:31 -08:00
Ryan Houdek
f848957e17
Implements unit tests for the new unaligned atomics
...
Tests all the unaligned atomic ops we support now
2021-02-22 18:25:25 -08:00
Ryan Houdek
633ea045e5
Handles unaligned cmpxchg/cmpxchg8b in SIGBUS handler
...
cmpxchg/cmpxchg8b doesn't have alignment requirements on x86, which means
applications rely on unaligned behaviour support with it.
Steam relies on this to work for a linked list array of jobs in some
internal job queueing system. It will end up always aligning by offsets
of 4 since it stores a couple of pointers.
Doesn't currently support the case of unaligned cmpxchg8b crossing a
cacheline, which ends up being semi-broken depending on which x86
behaviour the application is expected.
Intel CPUs do the "Big ring lock" or "split locks". Which means accesses
across cachelines are atomic.
AMD CPUs will tear the value across the cacheline, which is expected x86
behaviour by spec.
If they are expecting Intel behaviour, then that application is just
broken on non-Intel platforms unless they are fine with a tear.
2021-01-20 16:07:50 -08:00
Ryan Houdek
9e20979eff
Adds imul unit tests that check flag results
2020-09-29 12:33:34 -07:00
Stefanos Kornilios Mitsis Poiitidis
5248991a14
Merge pull request #440 from Sonicadvance1/fix_insextr_index
...
Ensures PEXTR and PINSR mask the element selection correctly
2020-09-29 11:22:09 +03:00
Stefanos Kornilios Mitsis Poiitidis
b9d004b639
Merge pull request #439 from Sonicadvance1/cmpxchg_edgecase
...
Fixes edge case that wasn't covered in FEX's cmpxchg
2020-09-29 11:20:45 +03:00
Ryan Houdek
10f1641068
Extends SHLD/SHRD unit tests to ensure Zext behaviour
2020-09-28 16:58:27 -07:00
Ryan Houdek
ae7aa51b0c
Extends PEXTRW and PINSRW unit tests
...
Ensures that an index past the max element is correctly masked
2020-09-27 18:50:25 -07:00
Ryan Houdek
3a4d5220fe
Adds 32bit GPR cmpxchg unit test
...
Ensures only RAX is zexted from 32bits rather than both RAX and RBX when
compare fails.
2020-09-27 17:49:54 -07:00
Ryan Houdek
b878006f18
Extends the PSADBW unit tests
...
Weren't quite extensive enough
2020-09-27 16:54:57 -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
75109050c0
Merge pull request #409 from Sonicadvance1/maskmov
...
Implements MASKMOVQ and MASKMOVDQU
2020-09-23 09:49:20 +03:00
Ryan Houdek
8a62065917
Implements new unit tests for these instructions
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
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
Stefanos Kornilios Mitsis Poiitidis
2425ab994b
Thunks: Generation script refactor, generic callbacks
2020-09-22 14:35:38 +03:00
Ryan Houdek
bfde44a288
Merge pull request #386 from FEX-Emu/skmp/fix-shld-shrd
...
x86disp: Fix shld/shrd flags
2020-09-16 12:36:51 -07:00
Stefanos Kornilios Mitsis Poiitidis
ef111eb287
unittests: Fix SH*D tests
2020-09-16 22:21:41 +03:00
Ryan Houdek
ded48258d6
Merge pull request #378 from FEX-Emu/skmp/fix-BT-offsets
...
x86disp: BT/BTR/BTS/BTC make bit index signed
2020-09-15 10:05:47 -07:00
Ryan Houdek
b5e354d341
Merge pull request #380 from FEX-Emu/skmp/fix-movhlps
...
x86disp: Add movhlps special case
2020-09-15 10:04:17 -07:00
Ryan Houdek
e11d3ed83a
Merge pull request #382 from FEX-Emu/skmp/fix-xadd-regreg
...
x86disp: fix xadd reg,reg
2020-09-15 10:02:04 -07:00
Ryan Houdek
cadf53c9d9
SHRD and SHLD unit tests for flag setting
...
Tests all flags aside from PF
2020-09-15 13:42:57 +03:00
Ryan Houdek
9e055d9ba7
Ensures xadd stores the correct result in to the destiation register
...
For when both source and destination is GPR
2020-09-15 13:32:24 +03:00
Ryan Houdek
68752de97c
Fixes missing movhlps test and moves current to correct file
...
movhlps moves from top 64bits of second argument to bottom 64bits of
destination
Only supports reg<->reg movement
2020-09-15 13:26:28 +03:00
Ryan Houdek
1b6767fbac
Adds BT/BTC/BTR/BTS unit tests to test negative offset
...
The offsets are signed integers, not unsigned
2020-09-15 13:19:17 +03:00
Stefanos Kornilios Mitsis Poiitidis
4f05fe36b6
asm tests: 0F_6E also checks mm,mem forms
2020-09-15 13:12:59 +03:00
Ryan Houdek
6e28d316df
Adds MOVD unit test to ensure zext
...
32bit needs to zext to 64bit mmx
64bit is regular move
2020-09-15 12:59:33 +03:00
Stefanos Kornilios Mitsis Poiitidis
8c8e6294b6
Thunks: ALTINST, OP_THUNK, basic infrastructure
2020-07-20 13:52:28 +03:00
Stefanos Kornilios Mitsis Poiitidis
c19e8b3d2f
Implement PAVGB/PAVGW
2020-07-04 19:30:53 +03:00
Ryan Houdek
ceab504211
Implements unit tests for psadbw
2020-05-31 03:22:11 +01:00
Ryan Houdek
ee931def98
Implements three unit tests for the new conversion ops
2020-04-29 19:03:48 -07:00
Ryan Houdek
bf5dbdf143
Adds reciprocal unit tests
2020-04-24 23:36:01 -07:00
Stefanos Kornilios Mitsis Poiitidis
227d6dc8c1
Merge pull request #83 from Sonicadvance1/unordered_ordered_compare
...
Implements unordered and ordered compare IR op
2020-04-05 13:02:44 +03:00
Ryan Houdek
b0c9ae848b
Implements unit tests for the unordered and ordered comparisons
2020-04-04 23:19:30 -07:00
Ryan Houdek
842ef332eb
Implements 71 new MMX unit tests
2020-04-01 20:04:05 -07:00
Ryan Houdek
6899a8f53a
Implements unit tests for sqrtpd, sqrtps, and rsqrtps
2020-03-20 18:14:44 -07:00
Ryan Houdek
8e5fe4ba76
Implements the rest of the TwoByte table unit tests
2020-03-08 22:07:59 -07:00
Ryan Houdek
b227086cb1
Initial unit tests for the two byte table
...
Not yet complete, about halfway there
2020-03-07 21:54:43 -08:00