Nekotekina
37dbbce194
SPU LLVM: Enable "Giga table" in Mega mode
...
Was previously only enabled in Giga mode.
Also fill the table with branch patchpoints.
2019-10-27 13:04:05 +03:00
Nekotekina
8c28c4e8ec
SPU: Make recompilers lock-free.
2019-10-26 23:33:18 +03:00
Nekotekina
9ac6ef6494
SPU: cleanup former OOM handling
...
Remove cpu_flag::jit_return.
It's obsolete now, and worked only in SPU ASMJIT anyway.
2019-10-26 21:24:12 +03:00
MSuih
f3ed26e9db
Small warnings cleanup ( #6671 )
...
* Ignore more warnings
These are intentional
* Signed/unsigned mismatch when comparing
* Explictly cast values
* Intentionally discard a nodiscard value
* Change ppu_tid to u32
* Do not use POSIX function name on Windows
* Qt: Use horizontalAdvance instead of width
* Change progress variables to u32
2019-10-25 13:32:21 +03:00
Nekotekina
b329bb604c
SPU LLVM: implemented asynchronous compilation
...
Implemented interpreter-based pre-recompiler.
Interpreter functions are build with SPU LLVM.
2019-10-21 19:29:34 +03:00
Nekotekina
0fe46934de
Fix "SPU Interpreter (fast)"
...
Regression after #6770
2019-10-16 14:20:35 +03:00
Nekotekina
eafbc77c0d
SPU LLVM: Always use linux-gnu target triple (affects Windows)
...
Unify internal code generation to make better use of GHC calling convention.
Ideally, it would just work on Windows as well, but some random bug appeared.
This bug was causing freezes on SPU LLVM compilation.
This commit desperately attempts to workaround it.
2019-10-15 18:04:50 +03:00
Nekotekina
c69fe0f664
SPU Profiler preview
...
Add option "SPU Profiler" (disabled by default).
Works only with SPU recompilers.
Results are flushed on pausing.
2019-10-15 17:42:57 +03:00
Eladash
c2278fb879
spu: Mask SRR0 at write
2019-10-08 02:52:33 +03:00
Nekotekina
239f53568c
SPU: optimize function dispatch in trampolines
...
Add a top-level hashtable
2019-10-06 16:03:38 +03:00
Eladash
feabe71183
SPU: Rewrite BGX
2019-09-28 03:42:22 +03:00
Eladash
e315b39822
SPU: Rewrite CGX
2019-09-28 03:42:22 +03:00
Nekotekina
a6edcca6e6
Use g_fxo for spu_cache
2019-09-26 23:26:36 +03:00
Nekotekina
9672ad53cd
Fix SPRX building on AppImage builds
2019-08-27 17:25:55 +03:00
Nekotekina
8517ccfdfa
Add new typemap for always existing objects
...
Not to be confused with singletons or global variables.
2019-08-22 02:13:39 +03:00
Nekotekina
1b140c8e97
SPU Recompiler: optimize JIT memory consumption
...
Avoid rebuilding trampoline for every function at startup.
This should fix Out of Memory error in some cases.
2019-07-19 04:56:35 +03:00
Nekotekina
736ec4035e
Fixup for SPU Recompilers, regression after #6210
2019-07-15 19:51:58 +03:00
Nekotekina
cb5c26f2b5
Fix SPU Interpreter regression after #6147
2019-07-15 16:34:34 +03:00
msuih
690cdff0d3
Minor fixes
...
- Fix a typo in OpenAL
- Fix typo in cellHttp.h
- Unused variables in catch
- Use 64-bit shifts
- Use use_count with shared pointers, unique is depracated and getting removed
- Explicitly cast boolean to int
- Signed/unsigned issues with loop variables
- Fix missing return statement (the code path is unreachable, but compiler wants a return)
- */ ouside of comment
- Fix duplicate layout name
2019-07-01 04:33:23 +03:00
Lassi Hämäläinen
c963c51a60
Remove unnecessary header includes
...
- Manually removed lot of unneeded #includes to clean code and reduce
compilation time
- Reordered some of the #includes to be in more logical order
2019-06-25 17:11:10 +03:00
Nekotekina
b9b591bf02
Fix SPU Loop Detection
2019-06-20 14:46:32 +03:00
Nekotekina
5d45a3e47d
Implement cpu_thread::suspend_all
...
Remove Accurate PUTLLC option.
Implement fallback path for SPU transactions.
2019-06-19 20:36:12 +03:00
Nekotekina
447029a700
Implement fs::file::write_gather (Vectored I/O)
2019-06-03 23:18:39 +03:00
Nekotekina
bf7ee2de4c
SPU: fix spu_runtime::g_tail_escape (unused yet)
2019-05-17 23:44:19 +03:00
Nekotekina
2cf139c7a8
SPU analyser: minor Safe fix
...
Properly handle known indirect branch target as a function call target.
2019-05-17 23:44:19 +03:00
Nekotekina
a016728a9e
SPU LLVM: re-enable stack mirror
...
It was disabled due to other bugs which should be fixed now.
2019-05-16 04:12:08 +03:00
Nekotekina
26d131ef29
SPU LLVM: Fix Giga mode
...
Forgot to adjust global chunk table computation.
2019-05-16 04:02:33 +03:00
Nekotekina
91897fa69d
SPU LLVM/ASMJIT: fix BRA/BRASL instructions for PIC
...
Handle absolute branch addressing correctly.
2019-05-16 02:41:31 +03:00
Nekotekina
f95ec8a37c
SPU LLVM: simplify jump table computation
...
Remove one add operation and adjust constants instead.
2019-05-16 00:54:50 +03:00
Nekotekina
a921af1e96
SPU LLVM/ASMJIT: remove minor unnecessary code
2019-05-16 00:52:52 +03:00
Nekotekina
43ae4b3f33
SPU LLVM/ASMJIT: add missing PC clamping
...
Minor fix, since it's mostly impossible to overflow.
2019-05-16 00:51:47 +03:00
Nekotekina
007108100e
SPU: implement spu_runtime::g_tail_escape
...
May help to avoid gateway costs in some cases.
2019-05-15 18:47:40 +03:00
Nekotekina
4e75d2c2f7
SPU LLVM: don't save $2 in optimized functions
2019-05-15 16:41:57 +03:00
Nekotekina
adc7d96683
SPU LLVM: simplify function prototype
...
Pass only $3
2019-05-15 16:18:13 +03:00
Nekotekina
16401722f1
SPU LLVM: fix $SP passing in functions, write PC on halt
...
Allows to skip updating $SP in optimizable functions.
2019-05-15 15:42:03 +03:00
Nekotekina
3753d27aba
SPU: fix Giga mode (kinda)
...
Don't scan before the entry point.
Disable stack mirror in SPU LLVM.
Improve analyser logic for holes.
2019-05-14 22:15:04 +03:00
Nekotekina
c481472faf
SPU ASMJIT: add PIC support (fix)
...
Also cleanup and adapt for GHC CC.
2019-05-14 22:15:04 +03:00
Nekotekina
82295d131a
SPU LLVM: split LLVM IR dump to spu-ir.log
...
Also move disasm to spu_recompiler_base::dump.
Interleave disasm with block target info for convenience.
2019-05-14 22:15:04 +03:00
Nekotekina
1eed421774
SPU LLVM: use branch patchpoints again
...
Renewed and adapted for PIC and all branch types.
This may address performance degradation after #5923 .
2019-05-14 22:15:04 +03:00
Nekotekina
2f6707d0a0
SPU LLVM: regain some efficiency
...
Avoid returns from the recompiler gateway, favoring tail calls.
This may address performance degradation after #5923 .
2019-05-14 22:15:04 +03:00
Nekotekina
f33b81545e
SPU: implement recompiler gateway function in assembly
...
Use GHC calling convention directly for SPU object entry points.
This may address performance degradation after #5923 .
2019-05-14 22:15:04 +03:00
Nekotekina
a74fd27e3d
SPU LLVM: fix SPU termination (spu_escape) on Windows
...
Adjust restored stack pointer for the lack of tail call.
2019-05-14 22:15:04 +03:00
Nekotekina
cc8c635855
SPU: PIC support preview
...
SPU ASMJIT not supported yet.
Giga mode not supported properly.
2019-05-14 22:15:04 +03:00
Rui Pinheiro
1f82a26a9c
SPU LLVM: Fix Mega
2019-05-12 00:39:42 +03:00
Nekotekina
8194c92f1c
SPU LLVM: disable GHC CC for chunks on Windows
...
Causes fatal error inside LLVM.
2019-05-11 02:35:16 +03:00
Nekotekina
7492f335e9
SPU analyser: basic function detection in Giga mode
...
Misc: fix EH frame registration (LLVM, non-Windows).
Misc: constant-folding bitcast (cpu_translator).
Misc: add syntax for LLVM arrays (cpu_translator).
Misc: use function names for proper linkage (SPU LLVM).
Changed function search and verification in Giga mode.
Basic stack frame layout analysis.
Function detection in Giga mode.
Basic use of new information in SPU LLVM.
Fixed jump table compilation in SPU LLVM.
Disable broken optimization in Accurate xfloat mode.
Make compiled SPU modules position-independent in SPU LLVM.
Optimizations include but not limited to:
* Compiling SPU functions as native functions when eligible
* Avoiding register context write-out
* Aligned stack assumption (CWD alike instruction)
2019-05-11 02:13:19 +03:00
Nekotekina
a703460fc6
SPU ASMJIT: skip some unused analyser steps
...
May improve performance
2019-05-04 19:35:13 +03:00
Nekotekina
45ce8db6cb
SPU Analyser: fix reg origin regression
...
Propagate phi instead of claiming new values
2019-05-04 18:29:47 +03:00
Nekotekina
4bd022f778
SPU analyser: minor logic fix and cleanup
...
Don't fill any chunk info for now (design mistake).
2019-05-03 14:18:22 +03:00
Nekotekina
6c34d7104e
SPU analyser: fix excessive workload list size
...
Typo grade; regression
2019-05-02 23:29:02 +03:00