Commit graph

80 commits

Author SHA1 Message Date
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 2ade3c594c LLVM DSL: expression matching (preview 2)
Implement more instructions.
2019-04-25 03:33:18 +03:00
Nekotekina ac473eb400 Rewrite cpu_translator::rol, add fshl and fshr
Use new funnel shift intrinsics
2019-04-24 23:55:41 +03:00
Nekotekina 42448cf3e5 Remove cpu_translator::scarry, cpu_translator::merge 2019-04-24 23:55:41 +03:00
Nekotekina 524aac75ed LLVM DSL: rewrite bitcast, zext, sext, trunc, select, min, max ops
Are made composable in expressions similar to arithmetic ops.
Implement noncast in addition to bitcast (no-op case).
Implement bitcast constant folding.
Fixed some misuse of sext<>.
2019-04-24 23:55:41 +03:00
eladash b307aff9eb Prefetch byteswapped opcodes in ppu interpreter 2019-04-11 17:47:52 +03:00
eladash 3304e3b0b7 PPU LLVM: Fix STSWI and LSWI 2019-04-11 17:47:52 +03:00
eladash f028737db8 Implement fallback for PPU LLVM
This matches with interpreter implementation, fixing unregistered functions in lost cases
2019-04-11 17:47:52 +03:00
Nekotekina d873802b9c Use LLVM 9
Use new add/sub with saturation intrinsics
2019-03-30 01:36:48 +03:00
Nekotekina 7e0b941e9f PPU LLVM: implement get_vrs<>() adaptor
Make use of structured bindings
2019-03-30 01:36:48 +03:00
eladash fb8302817f ppu: Set link unconditionally 2018-12-10 01:34:02 +03:00
Nekotekina b2f29cd4d4 LLVM: remove false alarm errors
Writable sections ARE supported
2018-09-27 12:16:43 +03:00
scribam f294729b28 ppu: improve lvebx/lvehx/lvewx instructions 2018-09-11 21:20:52 +03:00
Nekotekina a424fcfcf7 PPU LLVM: fix phenoms 2018-08-12 02:42:32 +03:00
Nekotekina 03e6725fcf PPU LLVM: simplify VMSUMUHS 2018-07-21 12:18:07 +03:00
scribam 2ed6e51d24 ppu: improve vnmsubfp instruction 2018-07-09 03:33:05 +04:00
scribam 733efc6b0d ppu: improve fnmsubs instruction 2018-07-09 03:33:05 +04:00
scribam f1e6532ec0 ppu: improve fnmsub instruction 2018-07-09 03:33:05 +04:00
Nekotekina 2f0dc9bd0f PPU LLVM: simplify VSUBCUW, VSUBUBS, VSUBUHS, VSUBUWS 2018-07-06 00:33:52 +03:00
Nekotekina 9d9869e803 PPU LLVM: simplify VADDCUW, VADDUBS, VADDUHS, VADDUWS 2018-07-06 00:33:52 +03:00
Nekotekina a0bf103e8b Implement cpu_translator::pshufb<>()
Remove spu_translator::pshufb<>()
Improve PSHUFB emulation (pre-SSSE3)
Emit static shufflevector for the constant mask
PPU: Inline VPERM instruction
2018-07-06 00:33:52 +03:00
Nekotekina e009bbac10 Use LLVM 7 (master) 2018-07-06 00:33:52 +03:00
isJuhn 3d8223fccc Fix LLVM STW reservation update 2018-07-02 15:19:50 +04:00
Jake edeb858138 loader: ignore invalid index_value and allow relative reloc 10 2018-06-24 14:29:41 +04:00
isJuhn 83f096c435 Add conditional reservation update to STW 2018-06-23 23:13:34 +04:00
jjsat 53ca2526ed Fix VSLO and VSRO in the LLVM PPU recompiler 2018-06-10 20:12:40 +04:00
Nekotekina a975ecdc4f Use LLVM 6 2018-05-08 13:05:29 +03:00
Nekotekina 8b704588d0 Update cpu_translator 2018-05-08 13:05:29 +03:00
Nekotekina db229dffb0 PPU LLVM: minor update 2018-05-08 13:05:29 +03:00
VelocityRa 706faa1d32 PPUTranslator: Ignore relative relocations 2018-04-01 01:32:08 +04:00
Nekotekina cce0ad0c35 Clean vm::ps3 namespace use 2018-02-09 17:49:37 +03:00
Nekotekina b01e460863 PPU LLVM: rewrite AVG instructions 2018-02-08 21:10:03 +03:00
Nekotekina 93c0a0aa35 PPU LLVM: rewrite add/sub instructions
Use new patterns for saturation instructions
Avoid ZExt/SExt completely
2018-02-08 21:10:03 +03:00
Nekotekina db83113316 Initial cpu_translator impl 2018-02-08 21:10:03 +03:00
Nekotekina 140a581d23 PPU: redesign LVSL, LVSR instructions 2017-12-20 00:04:09 +03:00
scribam 3e7ed8a831 PPUTranslator minor changes 2017-11-08 08:34:00 +04:00
Nekotekina f9a69c449d PPU LLVM: minor bitcast avoidance 2017-07-23 11:03:38 +03:00
Nekotekina bab537c7e2 PPU LLVM: unuse FP_SAT_OP 2017-07-12 14:00:38 +03:00
RipleyTom 34709eb399 Fix Stswi instruction 2017-07-10 18:42:02 +03:00
Nekotekina f0d184f38b PPU LLVM: relocation support 2017-07-04 02:04:22 +03:00
Nekotekina c087a9534a PPU LLVM: SSA reordering
Fetch indirect jump target
Flush registers earlier
2017-06-29 17:48:55 +03:00
Nekotekina da87bb6710 PPU LLVM: minor fix 2017-06-29 17:48:55 +03:00
Nekotekina 3c064439b3 PPU LLVM: new mptr/cptr format 2017-06-29 17:48:55 +03:00
Nekotekina 85f8a42bd2 PPU: MTOCRF optimization 2017-06-29 17:48:55 +03:00
Nekotekina ef55d6fa0c PPU LLVM: less trash, fix crash 2017-06-29 17:48:55 +03:00
Nekotekina aa34fa8baa PPU LLVM: some passes disabled 2017-06-29 17:48:55 +03:00
Nekotekina fc2a45d6d6 Removed unnecessary code 2017-06-29 17:48:55 +03:00
Nekotekina 89f676de75 PPU: preparations (no fixes) 2017-06-26 16:56:13 +03:00
Nekotekina 061c92ba1f PPU LLVM: Improve FlushRegisters 2017-06-26 16:56:13 +03:00
Nekotekina 8034196c25 ppu_syscall_code type added (for fmt) 2017-06-26 16:56:13 +03:00