Commit Graph
9533 Commits
Author SHA1 Message Date
Ryan Houdek 2c3b151e68 Merge pull request #595 from FEX-Emu/skmp/hotfix-zext-overelimination
Hotfix: Disable ConstProp/RemoveUselessMasking, add a test for it
2020-12-25 05:10:07 -08:00
Stefanos Kornilios Mitsis Poiitidis 2fbf22a9de Hotfix: Disable ConstProp/RemoveUselessMasking, add a test for it 2020-12-25 15:04:27 +02:00
Ryan Houdek c2e81c60a7 Update CODE_OF_CONDUCT.md 2020-12-25 01:57:09 -08:00
Ryan Houdek a02d63e224 Create CODE_OF_CONDUCT.md 2020-12-25 01:43:22 -08:00
Ryan Houdek ca2a10e0e5 Removes dead HandleSyscall function
The virtual function is called directly, so we were missing the strace
functionality
2020-12-19 19:50:33 -08:00
Ryan Houdek 69de873c34 Fixes some tables definitions for 32bit 2020-12-19 19:33:28 -08:00
Stefanos Kornilios Mitsis Poiitidis ef75b8e4ec Merge pull request #582 from Sonicadvance1/move_syscalls
Moves FEXCore's SignalDelegator and SyscallHandler to the frontend
2020-12-16 12:52:39 +02:00
Stefanos Kornilios Mitsis Poiitidis 5889ad9d60 Merge pull request #584 from Sonicadvance1/asan_fixes
Fixes I found when running ASAN
2020-12-14 20:02:56 +02:00
Stefanos Kornilios Mitsis Poiitidis 3e97b358be Merge pull request #583 from Sonicadvance1/FEXConfig_changes
Fixes for FEXConfig
2020-12-14 15:47:40 +02:00
Ryan Houdek e50a03fcdc Some warning fixes and uninitialized values fixes in ConstProp 2020-12-14 04:00:04 -08:00
Ryan Houdek 9f5a507f67 Disables lower 32bit mapping check when ASAN is compiled in
LLVM ASAN sticks some things in the upper range of the 32bit memory
range.
So we have to just allow it when using LLVM asan
2020-12-14 03:59:04 -08:00
Ryan Houdek 7eb708afee Shuts up a c++20 warning
This operator== is claiming to be ambiguous.
Just make the function const to make it unambiguous
2020-12-14 03:57:56 -08:00
Ryan Houdek ba134ea634 Fixes a bug in RA that valgrind found
Needs to ensure the interference list only checks against the class
interference if that register fits in its array.

Checking only empty wasn't good enough, check the array size first.
2020-12-14 03:56:39 -08:00
Ryan Houdek 232fac8fb7 Makes sure to memset the invalid node
Valgrind caught it relying on uninitialized values
2020-12-14 03:56:04 -08:00
Ryan Houdek 767fa9eb63 Fixes a bug in our BitSet class
For anything that was allocating less than the minimum element size, it
was allocating zero bytes
2020-12-14 03:55:26 -08:00
Ryan Houdek ae6922b17c Merge pull request #555 from FEX-Emu/skmp/masking-elimination
ConstProp: Masking elimination
2020-12-13 22:44:28 -08:00
Ryan Houdek 92c8303798 Fixes for FEXConfig
Fixes the formatting. Everything was using the incorrect formatting.

Changes the saved msg popup to a generic popup handler.

If a file couldn't be opened, open a popup claiming the error.
Makes it nicer to realize when trying to open main and nothing happens
when the file doesn't exit
2020-12-13 22:39:10 -08:00
Ryan Houdek 37983006f0 Moves FEXCore's SignalDelegator and SyscallHandler to the frontend
Sadly these things can't be split without breaking functionality so it
turns in to a bit of a mess.

SyscallHandler is very much something that is a Linux only construct and
shouldn't be in FEXCore itself. Lets the frontend register a
Syscallhandler with FEXCore. FEXCore itself is then aware of the current
syscall ABI and handles the ABI in an optimal fashion.
So it is not a 100% clean break otherwise we would lose performance.

The SignalDelegator then needs to move to the frontend since the
SyscallHandler requires it for signal based syscalls.
The CPU backend signal handling still needs to happen in FEXCore because
it is a very tight coupling with the CPU backend.
Once we need to support more Signal handling we can give the backends
cleaner support to select which specific OS handler to handle.
2020-12-13 22:38:04 -08:00
Stefanos Kornilios Mitsis Poiitidis 22629b6f5a ConstProp: Remove ROR case, ROR no longer exists 2020-12-12 12:10:14 +02:00
Stefanos Kornilios Mitsis Poiitidis 0df84be18c ConstProp: Remove some BFEs that do nothing 2020-12-12 12:10:14 +02:00
Stefanos Kornilios Mitsis Poiitidis 784cd648f1 ConstProp: SBFE useless masking elim, VMOV elim 2020-12-12 12:10:14 +02:00
Stefanos Kornilios Mitsis Poiitidis 60ce62cb2d ConstProp: Special case BFE, AND in RemoveUselessMasking sub-pass 2020-12-12 12:10:14 +02:00
Stefanos Kornilios Mitsis Poiitidis 5eb42e4490 ConstProp: Documented different sub-passes, remove leftover continue; statements 2020-12-12 12:10:14 +02:00
Stefanos Kornilios Mitsis Poiitidis b2eeb104f7 ConstProp: Add RemoveUselessMasking, implement for a few ops 2020-12-12 12:10:14 +02:00
Stefanos Kornilios Mitsis Poiitidis 00a2560905 Merge pull request #579 from Sonicadvance1/remove_shm
Removes SHM and non-unified memory!
2020-12-10 18:22:13 +02:00
Ryan Houdek 17c34537f9 Redisable the mlockall unit test
CI runners don't have enough RAM to ensure it consistently passes, so it
is flakey
2020-12-10 02:15:52 -08:00
Ryan Houdek f17ec1661c Removes -U option from POSIX unit test runner
Option no longer exists.
mlockall POSIX test now works since it doesn't try to make 64GB of
memory resident in RAM
2020-12-10 02:09:52 -08:00
Ryan Houdek 36b24ad141 Removes all uses of non-unified memory and SHM regions
Let's just delete the whole thing!
2020-12-10 02:09:52 -08:00
Ryan Houdek 899e24abd0 Removes non-unified memory path from Interpreter 2020-12-10 02:01:14 -08:00
Ryan Houdek dc8caeaf91 Removes non-unified memory path from x86_64 2020-12-10 02:01:14 -08:00
Ryan Houdek 8e3ac44e65 Removes non-unified memory path from ARM64 2020-12-10 02:01:14 -08:00
Ryan Houdek 3d9bdd3c83 Removes the broken TestSingleStepHardware runner 2020-12-10 02:01:14 -08:00
Stefanos Kornilios Mitsis Poiitidis 6d671166e4 Merge pull request #578 from Sonicadvance1/more_robust_interpreter_check
More robust FEXInterpreter checks
2020-12-10 11:37:21 +02:00
Stefanos Kornilios Mitsis Poiitidis bd01808633 Merge pull request #577 from Sonicadvance1/smarter_dfl
Makes us handle DFL smarter
2020-12-10 11:34:07 +02:00
Stefanos Kornilios Mitsis Poiitidis 0816866c08 Merge pull request #576 from Sonicadvance1/remove_args
Removes Main config loader from test runners
2020-12-10 11:33:01 +02:00
Ryan Houdek 20f11f25ca Fixes FEXInterpreter argument loading
If the guest application tried pushing arguments then optparse was still
capturing them as unknown and failing.

Just push the arguments directly in to our argument lists
2020-12-09 20:35:02 -08:00
Ryan Houdek 01831ec264 Check for binfmt_misc install and run directly only if installed
If we want to execve files directly we need to ensure that the
binfmt_misc interpreter path is installed.
If it isn't installed then we need to fall down the regular path of
pushing FEX to the front of the argument list.
2020-12-09 20:34:03 -08:00
Ryan Houdek ee88edaa6d Changes FEXInterpreter install to a hardlink
The only way to determine if we are running in the "interpreter" mode is
by determining filename.
if any application does an execve then we use /proc/self/exe to
determine which FEX we should execute. Sadly this resolved the softlink
to FEXLoader, breaking the chain.
Change it to a hardlink in order to ensure this doesn't happen.

This also moves the install target outside of aarch64 install target so
it can be tested on x86 hosts.
2020-12-09 20:27:30 -08:00
Ryan Houdek 20a93ba96c Makes us handle DFL smarter
For the ones that should be IGNORE we can safely ignore them at that
point.
For the ones that have a default behaviour of crashing, just go ahead
and crash.

This was having the fun problem space that if we received an ignore
event, we would remove the fault handler then if the guest registered a
handler it would have never been called.

SIGWINCH specifically is one that defaults to ignore and we need to care
about. If SIGWICH happened before the guest registered a handler then it
would never receive the signal.

The ones that their default behaviour is faulting are fine to uninstall
and then immediately crash, since it is a real crash at that point.
2020-12-09 20:07:03 -08:00
Ryan Houdek 6dc532e90e Removes Main config loader from test runners
This was accidental and can cause test failures.
Make sure to not load arguments from Main config for these
2020-12-09 20:04:58 -08:00
Ryan Houdek d42caac423 Merge pull request #569 from Sonicadvance1/interpreter_check
binfmt_misc interpreter and execve improvements
2020-12-08 07:34:30 -08:00
Ryan Houdek 92dc46c8bd Adds x86 binfmt_misc support
Allows launching 32bit applications directly now
2020-12-08 07:28:51 -08:00
Ryan Houdek 61641dcc92 Adds interpreter handling to the x86 execve path
Will fix the same bugs as the 64bit path
2020-12-08 07:28:50 -08:00
Ryan Houdek 9882447ed5 Adds interpreter handling to the x64 execve path
Will fix some application launching problems
2020-12-08 07:28:50 -08:00
Ryan Houdek 3d21aaf617 Adds config option to syscall handler for determining if we're
interpreter
2020-12-08 07:28:50 -08:00
Ryan Houdek db49ab4149 Changes the frontend FEXLoader argument loading path
If the interpreter was executed then don't even try handling arguments.
They will all get passed to the guest application
2020-12-08 07:28:50 -08:00
Ryan Houdek 1b4dc23c13 Adds an argument loader without FEX arguments
Will be necessary when the interpreter path is enabled, we can't accept
arguments there
2020-12-08 07:28:50 -08:00
Ryan Houdek 4603b92b9f Adds an option for determining if we were interpreter executed
Will be necessary soon
2020-12-08 07:28:50 -08:00
Ryan Houdek a23c045c23 Adds a ELFLoader helper to determine supported ELF file
We will need to check if an application can be executed through the
interpreter by checking program getting executed
2020-12-08 07:28:50 -08:00
Ryan Houdek d7c4999355 Adds a symlink install target
Symlinks FEXLoader to FEXInterpreter and switches binfmt_misc to use it
It's the only safe way to determine if we are the interpreter or just
someone executing through FEXLoader directly.
2020-12-08 07:28:50 -08:00