Stefanos Kornilios Mitsis Poiitidis
3507328232
JIT/x64: Add block linking for x86_64
2021-01-13 22:16:07 +02:00
Stefanos Kornilios Mitsis Poiitidis
c46b932b26
JIT/arm64: Implement block linking
2021-01-13 22:03:46 +02:00
Ryan Houdek
e884525434
Fixes 16bit addr offset calculation
...
In the case of 16bit addressing mode, the upper bits 16bits are zext
prior to result.
2021-01-13 12:02:19 -08:00
Ryan Houdek
1084ecf2d3
Fixes more 16bit modrm addressing problems
...
In the case of an instruction that used 16bit addressing mode. It would
calculate the amount of displacement needing to be read using a 32bit
modrm mode. It would then read calculate modrm displacement again and
read the correct number of bytes.
Leftover bytes would then be in a mismatched state which means if an
instruction was using 16bit addressing + modrm + literal at /that/ point
the number of literal bytes remaining would be calculated as a negative.
This didn't actually break things since instructions that have modrm +
literal and can safely use 16bit addressing without breaking in a 32bit
environment is impossible on Linux. Due to the inability to map a memory
range in 16bit range.
2021-01-13 12:02:19 -08:00
Ryan Houdek
96b2c6ca8b
Merge pull request #637 from FEX-Emu/skmp/unsyncronized-rip
...
Dispatch: ExitFunction InlineConstant & unsynchronized rip
2021-01-13 10:58:58 -08:00
Stefanos Kornilios Mitsis Poiitidis
f951bc969e
Merge pull request #628 from Sonicadvance1/more_syscalls
...
Implements more syscalls
2021-01-13 20:45:02 +02:00
Stefanos Kornilios Mitsis Poiitidis
8758348dfd
Dispatch: Support constant Rips, don't syncronize on context on ddisp
2021-01-13 17:26:40 +02:00
Stefanos Kornilios Mitsis Poiitidis
271d5898fb
Merge pull request #642 from Sonicadvance1/fix_llvm_asan
...
Fixes 64bit ELF loading when LLVM ASAN is used
2021-01-13 12:55:58 +02:00
Stefanos Kornilios Mitsis Poiitidis
0c1510e763
Merge pull request #641 from Sonicadvance1/uninstall_handlers
...
Uninstalls both the signal delegator and logmanager handlers on shutdown
2021-01-13 12:15:10 +02:00
Stefanos Kornilios Mitsis Poiitidis
709075de58
Merge pull request #639 from Sonicadvance1/fix_32bit_program_header
...
Makes sure to not calculate zero sized program headers on 32bit
2021-01-13 12:08:00 +02:00
Stefanos Kornilios Mitsis Poiitidis
f34f8981ab
Merge pull request #638 from Sonicadvance1/irvalidation_memoryleak
...
Fixes a memory leak in IRValidation
2021-01-13 12:07:33 +02:00
Ryan Houdek
433162004a
Implements more syscalls
2021-01-12 14:50:17 -08:00
Ryan Houdek
067889c861
Merge pull request #644 from duck-37/faster-pmovmskb
...
Add specialized case for PMOVMSKB with vector ops
2021-01-12 12:25:50 -08:00
duck
ade89bba6a
XXX -> TODO
2021-01-12 15:19:45 -05:00
duck
059594cbd3
Add a quick comment for potential optimization
2021-01-12 15:15:41 -05:00
Ryan Houdek
f78a342a72
Merge pull request #645 from duck-37/dcse-flags
...
Make DCSE aware of OP_INVALIDATEFLAGS
2021-01-12 11:50:35 -08:00
duck
501bccdd80
Faster PMOVMSKB, part 2
2021-01-12 14:06:52 -05:00
duck
49afb6bceb
Faster PMOVMSKB instruction.
2021-01-12 14:06:51 -05:00
duck
c690e65365
Make sure to only record when necessary
2021-01-12 12:49:49 -05:00
duck
4e3934eddd
Make DeadContextStoreElimination aware of OP_INVALIDATEFLAGS
2021-01-12 12:47:32 -05:00
duck
464eb13b93
One-byte horizontal add support on x86-64.
2021-01-12 11:10:16 -05:00
Ryan Houdek
43af4e26d1
Fixes 64bit ELF loading when LLVM ASAN is used
...
Instead of hardcoding 64bit dynamic ELF files to 0x1'0000'0000 we
instead calculate the size of the ELF in memory. Then allocate the
ELF base up front.
LLVM ASAN steals a large amount of virtual memory space that intersected
with the original hardcoded range which caused memory allocations to
fail.
2021-01-11 09:07:16 -08:00
Ryan Houdek
aa3b77e4c8
Uninstalls LogManager handlers on shutdown
...
In case something manages to have stayed alive and tried throwing a
message, this will no longer crash.
Noticed this with the previous commit
2021-01-11 09:03:56 -08:00
Ryan Houdek
a442489001
Makes sure to not calculate zero sized program headers on 32bit
...
This is the same thing as the 64bit side
2021-01-11 08:51:13 -08:00
Ryan Houdek
8d2eebd644
Fixes a memory leak in IRValidation
2021-01-11 08:47:45 -08:00
Stefanos Kornilios Mitsis Poiitidis
552895b896
Merge pull request #626 from Sonicadvance1/fix_16bit_addressing
...
Fixes 16bit ModRM rm decoding
2021-01-11 16:19:56 +02:00
Stefanos Kornilios Mitsis Poiitidis
50597b8fd2
Merge pull request #621 from Sonicadvance1/fix_idle_ref_count_on_fork
...
Ensure idle wait ref counter is 1 on fork
2021-01-11 10:55:36 +02:00
duck
a63339c50d
Fix JCC negative offsets as well
2021-01-11 03:34:52 -05:00
duck
e610b12c97
Fix negative offset jumps on x86-32 by using 32-bit RIP
2021-01-11 03:20:25 -05:00
duck
4c295e6dfc
Fix compilation issues, re-rename due to pre-existing variable
2021-01-10 17:54:29 -05:00
duck
3c86a55bea
Size -> GPRSize for a bit more clarity
2021-01-10 17:50:22 -05:00
duck
9290e19fc5
Fix JCXZ on X86
2021-01-10 17:46:03 -05:00
Ryan Houdek
8028bfbdf4
Merge pull request #619 from FEX-Emu/skmp/gvisor-tests
...
Tests: Add gvisor tests
2021-01-10 08:19:50 -08:00
Ryan Houdek
7ee6b68d03
Fixes 16bit ModRM rm decoding
...
When we are running in 32bit mode then it is possible to have an
instruction's modrm working as 16bit mode.
All one needs to do is prefix the instruction with an address size
override
2021-01-10 02:18:30 -08:00
Ryan Houdek
63cc8c67f2
Ensure idle wait ref counter is 1 on fork
...
Once we fork, we no longer have any threads to track in the process.
Ensures we don't spin forever on forked process
2021-01-10 02:09:37 -08:00
Stefanos Kornilios Mitsis Poiitidis
1dd307f34b
JIT/x64: Implement distributed dispatch, jumps instead of call/ret
2021-01-10 03:23:40 +02:00
Stefanos Kornilios Mitsis Poiitidis
a76baf9a7f
JIT: Fix interpreter fallback path
2021-01-09 05:55:30 +02:00
Stefanos Kornilios Mitsis Poiitidis
26171e639e
Tests: Add gvisor tests
2021-01-09 04:17:35 +02:00
Stefanos Kornilios Mitsis Poiitidis
f3d5635182
IR: Make ExitFunction take NewRip as an argument, instead of implicit ctx store
2021-01-08 18:41:33 +02:00
Stefanos Kornilios Mitsis Poiitidis
3729a33665
jit: Basic distributed dipatch for arm64
2021-01-08 17:43:18 +02:00
Ryan Houdek
ee8dfb8fc5
Merge pull request #606 from duck-37/sigsegv-fail-tests
...
Have tests that throw a non-HLT SIGSEGV fail
2021-01-06 15:28:38 -08:00
Stefanos Kornilios Mitsis Poiitidis
dd71a45175
Merge branch 'main' into skmp/static-ra
2021-01-07 01:04:16 +02:00
Stefanos Kornilios Mitsis Poiitidis
5600ffbb4b
L1C: Use constant for masking
2021-01-07 00:27:08 +02:00
Stefanos Kornilios Mitsis Poiitidis
aaa80d0678
BlockCache: Add a hash based L1 cache for lookups
2021-01-06 23:37:25 +02:00
Stefanos Kornilios Mitsis Poiitidis
101b29c5ee
ConstProp: Fix build breakage w/ operator ==
2021-01-06 23:31:50 +02:00
duck
f9cd0f0179
Have tests that throw a non-HLT SIGSEGV fail
...
Patch moves HandleSIGSEGV in HostFactory.cpp to a non-frontend host signal handler, then registers its own frontend signal handler to catch unhandled segfaults.
2021-01-06 05:07:47 -05:00
Stefanos Kornilios Mitsis Poiitidis
45b6c39e2c
SRA: reload SRA on signal handler entry, recover from guest on context marshaling
2021-01-05 17:14:57 +02:00
Stefanos Kornilios Mitsis Poiitidis
86f74279e6
arm64: Fix SRA spills, OP_SYSCALL stack args
2021-01-05 17:14:57 +02:00
Stefanos Kornilios Mitsis Poiitidis
fa35e79c3f
arm64: Fix lr pushing
2021-01-05 17:14:57 +02:00
Stefanos Kornilios Mitsis Poiitidis
bcf382afc4
Interpreter: Fix LSHR to correctly zero extend
2021-01-05 17:14:57 +02:00