Commit Graph
9533 Commits
Author SHA1 Message Date
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 bec3cfff14 X86Tables: Fix MOVD SRC/DST size 2020-09-15 12:58:50 +03:00
Ryan Houdek aafa2540f2 Adds TEST unit test to ensure sign extension of imm
32bit source is sign extended when 64bit.
2020-09-15 12:41:29 +03:00
Stefanos Kornilios Mitsis Poiitidis 140c704f8a X86Tables: Fix testq imm to sext 2020-09-15 12:41:14 +03:00
Ryan Houdek 1d94f8b506 Implements RCR and RCL unit tests 2020-09-13 17:33:59 -07:00
Ryan Houdek 80a77b39be Implements RCR and RCL x86 ops
These are interesting rotate instructions that treats CF as an
additional rotation bit for the source.

So you end up with a 9bit, 17bit, 33bit, or 65bit rotate.
The rotate value is still masked by 0x1F or 0x3F depending on
instruction size.

This ends up with the quirk that this instruction doesn't directly map
to AArch64 rotations  for the smaller register sizes;
So we have to do some manual mirroring in a larger register to pull the
correct view out of the op
2020-09-13 17:29:51 -07:00
Ryan Houdek 8878278402 Implements new EXTR IR op
This maps directly to AArch64's EXTR op.
Maps closely to x86's SHRD instruction
2020-09-13 17:28:09 -07:00
Ryan Houdek a324f4c222 Implements missing BFI in JITs
We had the IR op but it wasn't implemented for the JITs
2020-09-13 17:26:26 -07:00
Ryan Houdek ceb316d97e Merge pull request #358 from Sonicadvance1/callback_support
Initial Callback support
2020-09-11 16:24:15 -07:00
Ryan Houdek c28a684305 Disable some tests that are unstable
These change behaviour erratically between PRs and need to be disabled
for now
2020-09-11 16:07:44 -07:00
Ryan Houdek e9b74b0230 Initial Callback support
This interface is for native host code to be able to call back in to JIT
to execute guest code.
This is mainly for thunks but could be used for other purposes.
This can cross a couple ABI boundaries so one must be careful when
calling in to this
2020-09-11 15:48:51 -07:00
Ryan Houdek 6f5e55c141 Merge pull request #372 from FEX-Emu/skmp/fix-brk-limit
Syscalls/BRK: Don't use more memory than mapped
2020-09-11 14:59:21 -07:00
Ryan Houdek fe07007ba6 Merge pull request #373 from FEX-Emu/skmp/fix-file-exc
EmulatedFiles: Don't crash on too long paths
2020-09-11 14:58:28 -07:00
Stefanos Kornilios Mitsis Poiitidis abcdff6a50 EmulatedFiles: Don't crash on too long paths 2020-09-12 00:53:39 +03:00
Stefanos Kornilios Mitsis Poiitidis b3ae845071 Syscalls/BRK: Don't use more memory than mapped 2020-09-12 00:39:11 +03:00
Scott Mansell b5fd0c9f6a Update IR docs 2020-09-11 21:50:30 +12:00
Scott Mansell 7c51806456 Fix arm64 JIT 2020-09-11 21:50:30 +12:00
Scott Mansell 3102fb78e7 Minor IR validation fixes 2020-09-11 21:50:30 +12:00
Scott Mansell 92a64aad2e Update DeadFlagStoreElimiateion pass 2020-09-11 21:50:30 +12:00
Scott Mansell 0a78651cce Fix ListBegin usages that got missed.
There are still a few in interpeter and IR compaction
which are harder to fix.
2020-09-11 21:50:30 +12:00
Scott Mansell d515753b38 Remove remaing traces of NodeWrapperIterator 2020-09-11 21:50:30 +12:00
Scott Mansell 70b3456536 Swich register allocator to new scheme. 2020-09-11 21:50:30 +12:00
Scott Mansell e756b46189 Allow AllNodes to iterate in reverse
We replace Dummy with the old unused BeginBlock
and pointing it at block header like EndBlock
2020-09-11 21:50:30 +12:00
Scott Mansell 3c6dbd0ade Change iterator type of IR.at
And switch over more passes to use the new interfaces.
2020-09-11 21:50:30 +12:00
Scott Mansell 6b26290b42 Switch most passes to use the new interface. 2020-09-11 21:50:27 +12:00
Scott Mansell df6618a4d2 New replace node functions
Probally doesn't build
2020-09-11 21:48:03 +12:00
Scott Mansell 4ad4f28a75 Add Code and All Code iterators 2020-09-11 21:48:03 +12:00
Scott Mansell 599231c180 IRListView: Add GetOp<T> 2020-09-11 21:48:03 +12:00
Scott Mansell 36afd5b1c6 Block Iterator: Use structured bindings 2020-09-11 21:48:03 +12:00
Scott Mansell 446b261f24 Iterator for blocks 2020-09-11 21:48:03 +12:00
Scott Mansell 316a2f8d96 IRValidation: Add arg liveness, numUses checks 2020-09-11 21:48:03 +12:00
Stefanos Kornilios Mitsis Poiitidis ad13c82918 Merge pull request #371 from Sonicadvance1/sigaction_gt64
Don't allow an application to try and set a signal past 64
2020-09-11 10:45:00 +03:00
Stefanos Kornilios Mitsis Poiitidis 87dbefd0a3 Merge pull request #367 from Sonicadvance1/sigsuspend
Implements sigsuspend
2020-09-11 10:43:50 +03:00
Ryan Houdek a9210be252 Merge pull request #370 from phire/reentrant_interpeter
Make Interpreter Reentrant; alloca SSAs on Stack
2020-09-11 00:38:48 -07:00
Ryan Houdek e08972b06a Don't allow an application to try and set a signal past 64
We only have 64, this is invalid!
2020-09-11 00:35:39 -07:00
Scott Mansell abd98be5f1 Make Interpreter Reentrant; alloca SSAs on Stack 2020-09-11 19:31:31 +12:00
Ryan Houdek 1309b4a0c5 Merge pull request #363 from Sonicadvance1/fix_thread_fork_shutdown
Ensures a process that has forked won't shutdown the other process
2020-09-11 00:05:22 -07:00
Stefanos Kornilios Mitsis Poiitidis 76691d8fab Merge pull request #353 from FEX-Emu/skmp/sdl2-for-csgo
Thunks: Improve SDL2 so that CSGO creates the window and GL context
2020-09-11 09:30:00 +03:00
Stefanos Kornilios Mitsis Poiitidis f11b1a5c4b Merge pull request #360 from Sonicadvance1/memory_syscalls
Implements two more memory syscalls
2020-09-11 09:22:21 +03:00
Stefanos Kornilios Mitsis Poiitidis 27dbc66e2e Merge pull request #361 from Sonicadvance1/cvtpd2dq
Implements missing CVTPD2DQ
2020-09-11 09:20:48 +03:00
Stefanos Kornilios Mitsis Poiitidis 197dac076e Merge pull request #369 from Sonicadvance1/getsetcap
Implements capget and capset syscalls
2020-09-11 09:19:10 +03:00
Ryan Houdek fb6e3535d8 Implements capget and capset syscalls
These are safe to pass through to the host, there isn't any system data
handled here.

Some game I was testing used these
2020-09-10 22:30:51 -07:00
Ryan Houdek a3ee4dff45 Implements sigsuspend
This helps out Mono's garbage collector specifically. There is a minor
race that can currently occur with signal 63 but that technically should
only occur on a pause or stop condition.

Might need to change this behaviour if it becomes a problem
2020-09-10 21:50:29 -07:00
Ryan Houdek 8aeb6718ac Merge pull request #362 from Sonicadvance1/fix_guest_signal_dfl
Fixes guest default signal handling and pending signals
2020-09-10 19:00:29 -07:00
Ryan Houdek 095e3ee0f6 Merge pull request #359 from Sonicadvance1/fix_getpriority
Fixes getpriority syscall
2020-09-10 18:53:33 -07:00
Ryan Houdek 98aef5ee19 Merge pull request #355 from Sonicadvance1/initial_32bit_unittest
Adds initial 32bit unit tests
2020-09-10 18:50:06 -07:00
Ryan Houdek 0df06960e1 Ensures a process that has forked won't shutdown the other process
Since we track the PID and TID of the threads for signaling purposes, we
had the problem that if a process forked and the child then shuts down.
It was still tracking the parent thread as executing, thus it would send
it a tgkill to shut it down.

This was unintended behaviour and is now stopped
2020-09-10 18:21:16 -07:00
Ryan Houdek 4f593f8e88 Updates POSIX unit tests results
These have changed behaviour due to the new changes
2020-09-10 18:16:24 -07:00
Ryan Houdek 290e2b55c4 Fixes guest default signal handling and pending signals
glibc raise() actually disables all signals, raises the signal that the
user wants, then reenables the previous signal mask.

On the reenabling of the previous signal mask, that is when the pending
signal fires.
This needs to be accurately handled, so check for pending signals
getting unmasked in sigprocmask

This also then needs to be further fixed to handle default signal
handling, where if a signal was sent that is default ignored (NOT set to
ignore!) then it would just exit the application before.
Now something likg SIGCHLD with the default handler (aka ignore) won't
kill the process
2020-09-10 18:16:24 -07:00