Commit Graph
910 Commits
Author SHA1 Message Date
Stefanos Kornilios Mitsis Poiitidis b2eeb104f7 ConstProp: Add RemoveUselessMasking, implement for a few ops 2020-12-12 12:10:14 +02: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
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
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 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 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
Stefanos Kornilios Mitsis Poiitidis 3ebc080bd4 Merge pull request #566 from Sonicadvance1/overlay_config
Switches over to having a correctly layered configuration system
2020-12-08 11:14:16 +02:00
Ryan Houdek f14cd54791 Switches over to having a correctly layered configuration system
Instead of having the configuration being loaded and stored in to a
frontend system. First moves the backing store of the configuration in
to FEXCore.

Each layer that is constructed then loads its particular configuration.
After the layers are loaded, then a meta layer is constructed that
merges the layers flat.

This means we will no longer hit the problem where a configuration is
stored in the "main" configuration file, then environment and arguments
passed manage to overwrite it.

The order of the layers going from inner most layer to outer most, with
outermost overwriting previous layer configurations is as follows:

Main < Global application < Local application < Arguments < Environment

One step that needs to be changed in the future is that FEXCore can then
just load its configuration from the layers directly since the data is
in FEXCore now. This will be reserved for a future change so we are less
disruptive.
2020-12-07 11:15:48 -08:00
Ryan Houdek f091878100 More 32bit syscall fixes
fstatfs64 and statfs64 was wrong, the syscall doesn't quite match the
glibc definition

Fixes recvmsg. Specifically the aux data was failing, thus SCM_RIGHTS
wasn't getting passed correctly.

Fixes a couple of time syscalls where their arguments are optional.
2020-12-04 09:30:33 -08:00
Ryan Houdek 30dc9128ca Removes the last usage of 8bit and 16bit multiply
This was causing issues in 32bit xeyes.
A couple of the multiply ops were still using 8bit and 16bit multiply
while the other one was already sexting or zexting the source.
2020-12-04 08:59:52 -08:00
Stefanos Kornilios Mitsis Poiitidis b2b0d9318a arm64: Fix OP_SELECT & OP_CONDJUMP gpr/fpr detection 2020-12-04 16:04:27 +02:00
Stefanos Kornilios Mitsis Poiitidis 1363be8239 x64: Add support for floats in OP_SELECT & OP_CONDJUMP 2020-12-04 15:30:55 +02:00
Stefanos Kornilios Mitsis Poiitidis b32ed1db8c x64: Refactor CC logic, add float compares 2020-12-04 15:30:55 +02:00
Stefanos Kornilios Mitsis Poiitidis b044413952 OpDisp, IR, Backends: Add Float compares to Select, CondJump, COND_F* 2020-12-04 15:30:55 +02:00
Stefanos Kornilios Mitsis Poiitidis cfdf6ebf6b IR: Change FCMP to return x86-style flags 2020-12-04 08:55:19 +02:00
Stefanos Kornilios Mitsis Poiitidis 3bc13581a8 Merge pull request #557 from FEX-Emu/skmp/memops-imm-pooling
ConstProp: LoadMem/StoreMem imm pooling
2020-12-04 08:54:13 +02:00
Stefanos Kornilios Mitsis Poiitidis 9b6f0df657 Merge pull request #545 from FEX-Emu/skmp/add-dfprse
IR: Add a rather ineffective DeadFPRStoreElim Pass
2020-12-04 08:52:47 +02:00
Stefanos Kornilios Mitsis Poiitidis 8e62a6891b Merge pull request #544 from FEX-Emu/skmp/lse-remove-partial-writes
LSE: Also optimize away partial writes
2020-12-04 08:52:21 +02:00
Stefanos Kornilios Mitsis Poiitidis b9f1bfe362 Merge pull request #540 from Sonicadvance1/32bit_fixes_rebase
A wackload of new 32bit syscall support
2020-12-04 08:51:47 +02:00
Stefanos Kornilios Mitsis Poiitidis 003991e495 Merge pull request #503 from Sonicadvance1/remove_duplicate_compaction
Remove duplicated compaction pass
2020-12-04 08:44:21 +02:00
Stefanos Kornilios Mitsis Poiitidis c29f890d7a IR: Add a rather ineffective DeadFPRStoreElim Pass 2020-12-04 08:08:23 +02:00
Stefanos Kornilios Mitsis Poiitidis 2f12fd6ee4 ConstProp: LoadMem/StoreMem imm pooling
If imms used in memops are close enough, generate them with address gen instead
of allocating a new const
2020-12-04 08:04:44 +02:00
Stefanos Kornilios Mitsis Poiitidis d622e7b557 LSE: Also optimize away partial writes 2020-12-04 07:53:33 +02:00
Ryan Houdek c116a20e13 Merge pull request #542 from FEX-Emu/skmp/frontend-improve-reps
OpDisp: Read DF outside REP loops as it won't change
2020-12-03 20:23:40 -08:00
Ryan Houdek bce3d3be8d Merge pull request #556 from FEX-Emu/skmp/fcmp-optimization
ConstProp: FCMP Optimization
2020-12-03 20:21:35 -08:00
Ryan Houdek a0149dff07 Merge pull request #554 from FEX-Emu/skmp/cmt-around-select
CMT: Move unary ops before selects
2020-12-03 20:20:45 -08:00
Ryan Houdek 439d49b802 Merge pull request #550 from FEX-Emu/skmp/improve-dead-flags
DFSE: Fix dead clag calculation, Extend InvalidateFlags
2020-12-03 20:18:43 -08:00
Ryan Houdek c7c2e56ae5 Merge pull request #552 from FEX-Emu/skmp/perblock-debug-data
JITSYMS: Per-block symbol information
2020-12-03 20:13:34 -08:00
Ryan Houdek 91ee753cae Merge pull request #553 from FEX-Emu/skmp/mul-to-lshl
ConstProp: Mul x,#powof2 -> Lshl x,ctz(#powof2)
2020-12-03 20:10:13 -08:00
Ryan Houdek 4187123b49 Merge pull request #551 from FEX-Emu/skmp/arm64-backend-opts
arm64: Backend Opts
2020-12-03 20:08:53 -08:00
Ryan Houdek eb57f5f489 Merge pull request #547 from FEX-Emu/skmp/optimize-flag-access
IR: Move BFEs to SetFlag, remove from OP_STOREFLAG
2020-12-03 20:07:53 -08:00
Ryan Houdek 12237abf67 Merge pull request #543 from FEX-Emu/skmp/frontend-improve-ss-sd
frontend: Improve IR for some *SS/*SD opcodes
2020-12-03 20:06:47 -08:00
Ryan Houdek 310252b97d A wackload of new 32bit syscall support
This implements a bunch of new 32bit syscalls which almost gets FEX to
be able to run Steam.

The main missing syscalls are mremap, shmat, and ioctl for supporting
Steam execution.
2020-12-03 20:03:15 -08:00
Ryan Houdek 17402aa02d Remove duplicated compaction pass
RA Pass and passmanager compaction pass don't need to be independent.
This saves some memory.

In the future we should allow passes to fetch passes by name, that will
be part of the PassManager improvement in the future
2020-12-03 19:58:47 -08:00
Ryan Houdek d3201ff498 Merge pull request #546 from FEX-Emu/skmp/sfbe-sext-switcheroo
IR: Replace Sext with Sbfe
2020-12-03 15:03:19 -08:00
Stefanos Kornilios Mitsis Poiitidis 62a5bc457d OpDisp: Read DF outside REP loops as it won't change 2020-12-03 20:19:00 +02:00
Stefanos Kornilios Mitsis Poiitidis 0024b7bd46 RA: Fix global value range expansion 2020-12-03 20:19:00 +02:00
Stefanos Kornilios Mitsis Poiitidis b2d862a8c7 IR: Replace Sext with Sbfe 2020-12-03 20:08:08 +02:00
Stefanos Kornilios Mitsis Poiitidis 2e314400bc ConstProp: FCMP Optimization
Removes unused flags from OP_FCMPs
2020-12-03 19:34:57 +02:00
Stefanos Kornilios Mitsis Poiitidis c802b82450 CMT: Move unary ops before selects, if both True & False values are consts 2020-12-03 19:11:25 +02:00
Stefanos Kornilios Mitsis Poiitidis 46fb0503f0 ConstProp: Mul x,#powof2 -> Lshl x,clz(#powof2) 2020-12-03 19:06:14 +02:00
Stefanos Kornilios Mitsis Poiitidis bc5b235b7c CompileService: Fix DebugData 2020-12-03 18:58:58 +02:00
Stefanos Kornilios Mitsis Poiitidis 28bff432e5 DebugData: Add Subblock list, populate it from arm64 backend 2020-12-03 18:43:38 +02:00
Stefanos Kornilios Mitsis Poiitidis 12fcd5c2c7 arm64: Avoid needless movs in OP_VMOV 2020-12-03 18:41:51 +02:00
Stefanos Kornilios Mitsis Poiitidis 27e2c4fbfd arm64: Optimize VIns* to only use temp reg if it must 2020-12-03 18:41:44 +02:00