Commit Graph
317 Commits
Author SHA1 Message Date
Ryan Houdek 50ae18cbaf Adds MOVNTDQA unit test 2021-03-06 06:23:27 -08:00
Stefanos Kornilios Mitsis Poiitidis 3978097f15 Merge pull request #705 from FEX-Emu/skmp/mmap-cache-flushing
Flush IR/Code cache on mmap, mmunmap & mprot
2021-03-03 12:59:29 +02:00
Stefanos Kornilios Mitsis Poiitidis 613e5b66ba SMC: Expand --smc-checks options to 'none', 'mman', 'full' 2021-03-03 12:49:23 +02:00
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 f1349becb4 Disables the unaligned atomic memory op tests
These don't run on the armv8.0 runner
2021-02-22 18:33:17 -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
Stefanos Kornilios Mitsis Poiitidis 3bc12de017 OpDisp: Imm SAR OpSize < 32 needs sign extension 2021-02-17 08:17:20 +02:00
Stefanos Kornilios Mitsis Poiitidis eb60bda1d3 OpDisp: Fix cvt/cvtt mapping to dispatcher handlers 2021-02-16 11:19:28 +02:00
Stefanos Kornilios Mitsis Poiitidis bed00d11f1 Tests: Disable pr57275.c because it uses VMOVAPS 2021-02-14 21:36:56 +02:00
Ryan Houdek 0aaed41f72 Merge pull request #751 from FEX-Emu/skmp/fix-fchmodat-faccessat
Syscalls: chmodat, faccessat glibc interface differs from kernel
2021-02-02 05:52:38 -08:00
Stefanos Kornilios Mitsis Poiitidis 3eed439728 gvisor: chmod passes now 2021-02-02 14:58:51 +02:00
Scott Mansell 16e7ba6fa8 Move nasm check inside unit tests
Allow building of fex without nasm if unit tests are disabled
2021-02-02 16:47:55 +13:00
Scott Mansell ba3bacb65b Disable more flaky gvisor tests
They assume fair scheduling
2021-02-01 18:43:35 +13:00
Scott Mansell 03db1b2040 Disable mcount_pic.c.gcc-target-test-64 test
It's flaky on the ARMv8.0 runner
2021-02-01 16:26:39 +13:00
Ryan Houdek a5d9e62cc6 More improvements to BRK handling
Base size is now only one page in size. We will then increment that BRK
size by 8MB alignments. 256MB for 32bit applications was causing some
applications on the edge to run out of virtual memory
I was hitting some 32bit applications that were being fairly mean with
BRK. They were allocating all of BRK space then running out of virtual
memory space with its mmap handler fallback after freeing BRK space.

This means we now munmap BRK pages on release for the guest, similar to
behaviour that Linux does.

Additionally I had an application that was getting very upset that BRK
wasn't actually at the end of program space. So allocate at the end of
program space like expected.

brk test now passes from gvisor
2021-01-27 10:12:25 -08:00
Ryan Houdek 536be23f68 Merge pull request #704 from FEX-Emu/skmp/add-gcc-target-tests
Add gcc target tests
2021-01-26 15:45:12 -08:00
Ryan Houdek 3679156dd7 Fixes timer syscall API
The glibc and kernel timer interfaces are sufficiently different enough
that unwrapping this through glibc is impossible.
Pass it directly through to the kernel.
2021-01-26 05:02:44 -08:00
Stefanos Kornilios Mitsis Poiitidis b453ede9ce Tests: Disable gcc target tests that fail only on arm 2021-01-26 14:55:35 +02:00
Stefanos Kornilios Mitsis Poiitidis 29a8fd0a4a Tests: Add gcc-target-tests for 32 and 64 bit 2021-01-26 12:00:45 +02:00
Ryan Houdek 8cbfef2e74 Updates gvisor test results that have changed due to OS update 2021-01-26 01:11:40 -08:00
Stefanos Kornilios Mitsis Poiitidis 8b025d4c26 IRLoader: Actually set EntryRIP if the IR was parsed 2021-01-21 22:19:16 +02: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
Stefanos Kornilios Mitsis Poiitidis 567e315854 Frontend, OpDisp: Don't assert on invalid instructions 2021-01-18 17:19:11 +02:00
Ryan Houdek e7315d9a97 Merge pull request #339 from FEX-Emu/skmp/ir-constant-pooling
ConstProp: Allocate constants once per block
2021-01-17 23:49:31 -08:00
Ryan Houdek fbe67db93b Merge pull request #657 from FEX-Emu/skmp/block-ordering
OpDisp: Improved Block Ordering
2021-01-17 23:39:53 -08:00
Ryan Houdek 63f9b62594 Merge pull request #497 from FEX-Emu/skmp/block-linking
Block linking
2021-01-17 23:35:40 -08:00
Stefanos Kornilios Mitsis Poiitidis 8b93d0a278 Tests: Add a basic const pooling test 2021-01-16 17:16:31 +02:00
Stefanos Kornilios Mitsis Poiitidis 1fc9480988 Tests: Add delinking test 2021-01-16 13:24:37 +02:00
Stefanos Kornilios Mitsis Poiitidis 5fdbb8a9b2 OpDisp: Improve block ordering for multi-block ops 2021-01-15 21:05:29 +02:00
Ryan Houdek 6b7d508401 Adds a couple LEA unit tests for 16bit addressing mode 2021-01-13 12:02:20 -08:00
Ryan Houdek 9869a7c576 Disables problematic gvisor test
This also manages to fail on master but for some reason not on the ARM
runners.
2021-01-12 15:04:43 -08:00
Ryan Houdek b857d6ba16 Disables killpg tests and reenables a few tests
killpg has been causing us testing problems for a while now.
As we were running more tests it was becoming more likely to hit a test
doing killpg in the background.

All of the tests run under the same process group so it is a significant
race condition to have these running.
Until we improve CI to somehow work around how killpg works, we just
need to have these disabled.
2021-01-11 09:12:02 -08:00
duck e610b12c97 Fix negative offset jumps on x86-32 by using 32-bit RIP 2021-01-11 03:20:25 -05:00
duck 86e6ea43a2 Fix test cases. 2021-01-10 18:31:23 -05:00
duck 9290e19fc5 Fix JCXZ on X86 2021-01-10 17:46:03 -05:00
Stefanos Kornilios Mitsis Poiitidis a29969139e Tests/gvisor: Disable mlock_test 2021-01-10 18:12:56 +02:00
Stefanos Kornilios Mitsis Poiitidis 311aa2b811 Tests: Cleanup scripts, review feedback 2021-01-10 18:06:02 +02:00
Stefanos Kornilios Mitsis Poiitidis 7808948fae Tests/gvisor: Disable some for the arm64-8.2 runner 2021-01-10 03:11:53 +02:00
Stefanos Kornilios Mitsis Poiitidis e4870b6090 Tests/gvisor: Disable some more 2021-01-09 20:03:34 +02:00
Stefanos Kornilios Mitsis Poiitidis 3ab55898d8 Tests/gvisor: Disable some more 2021-01-09 19:57:26 +02:00
Stefanos Kornilios Mitsis Poiitidis 32aea07335 Tests/posix: Disable some more 2021-01-09 19:47:06 +02:00
Stefanos Kornilios Mitsis Poiitidis 2957515967 Tests/posix: Disable some more 2021-01-09 19:40:50 +02:00
Stefanos Kornilios Mitsis Poiitidis 5c18ea3211 Tests/posix: Disable some more 2021-01-09 19:38:28 +02:00
Stefanos Kornilios Mitsis Poiitidis afaf79f568 Tests/posix: Disavle verbose for real 2021-01-09 19:33:53 +02:00
Stefanos Kornilios Mitsis Poiitidis 5b8c880f06 Tests/gvisor: Disable tests that fail on CI 2021-01-09 19:30:03 +02:00