Nekotekina
dcd011048d
Implement "built_function" utility (runtime-generated assembly)
...
Similar to build_function_asm, but links without indirection.
Achieved by emitting code directly into a byte array.
2021-12-22 19:27:20 +03:00
Malcolm Jestadt
2f93df480b
SPU LLVM: Disable affineqb shufb paths temporarilly
2021-12-10 19:32:10 +03:00
Malcolm Jestadt
0617e9e14b
SPU LLVM: Fix vgf2p8affineqb usage
...
- Reverse the order of the bytes in the selection masks. Previously it was assumed that byte 0 would determine the output of bit 0, but byte 7 determines the output of bit 0.
2021-12-06 12:34:11 +03:00
Malcolm Jestadt
3fde455932
SPU LLVM: Optimize branch following ORX
...
- test the input of ORX directly for zeroes, instead of the result
2021-11-11 12:58:38 +03:00
Malcolm Jestadt
7573d7289b
SPU LLVM: Hook up 128 bit spu verification
...
- Also fix FMA enablement for sapphirerapids
2021-11-06 21:12:12 +03:00
Nekotekina
69f321a471
LLVM 13
2021-11-02 20:11:08 +03:00
Malcolm Jestadt
f06c8b22e8
PPU/SPU LLVM: Emulate VPERM2B with a 256 bit wide VPERMB
...
- Save 1 uop by using 256 wide VPERMB instead of VPERM2B. (Compiles down to a vinserti128 and vpermb)
2021-10-13 17:51:54 +03:00
Eladash
ab50e5483e
GUI Utilities: Implement instruction search, PPU/SPU disasm improvements ( #10968 )
...
* GUI Utilities: Implement instruction search in PS3 memory
* String Searcher: Case insensitive search
* PPU DisAsm: Comment constants with ORI
* PPU DisAsm: Add 64-bit constant support
* SPU/PPU DisAsm: Print CELL errors in disasm
* PPU DisAsm: Constant comparison support
2021-10-12 23:12:30 +03:00
Malcolm Jestadt
86716dc37b
SPU LLVM: Optimize branches following byteswaps
...
- The first element can be extracted via vmovd rather than vpextrd, which saves 1 uop.
2021-09-30 13:22:35 +03:00
Malcolm Jestadt
f9ab077908
SPU LLVM: Use VDBPSADBW in SUMB
...
- This instruction can be used to sum bytes horrizontally if the second input vector is all zeroes.
2021-09-30 13:22:35 +03:00
Nekotekina
9e62ca562b
SPU LLVM: implement SQRT and DIV pattern detection (xf)
2021-09-17 10:23:43 +03:00
Nekotekina
d28b0ba2fa
SPU LLVM: implement spu_re, spu_rsqrte
...
Improve matching with peek_through_bitcasts() helper.
Implement erase_stores() helper.
2021-09-17 10:23:43 +03:00
Nekotekina
aba332d4c4
SPU LLVM: make intrinsics for most xfloat instructions
2021-09-17 10:23:43 +03:00
Nekotekina
543fb7a9cb
LLVM DSL / SPU LLVM: implement infinite precision shifts
...
Remove old make_*** helpers in favor of matcheable expressions.
2021-09-17 10:23:43 +03:00
Nekotekina
67b3fc70f8
LLVM DSL: implement absd and match helpers
...
Matcheable expression absd(a, b) (absolute difference).
2021-09-17 10:23:43 +03:00
Nekotekina
4b8ee85995
LLVM DSL: reimplement pshufb, add 'calli'
...
Implement postponed custom intrinsic replacement.
Make bitcast operator static like other ones.
2021-09-17 10:23:43 +03:00
Nekotekina
86ead1b93b
SPU LLVM: implement FI instruction
...
Use approximate reciprocal in FRSQEST.
2021-09-17 10:23:43 +03:00
Nekotekina
1685769bd9
LLVM DSL: reimplement fmuladd, force hw fma if present
2021-09-17 10:23:43 +03:00
Nekotekina
2acb6ed60d
SPU LLVM: optimize SHUFB for permutation-only shuffles
...
Drop constant generation when unused.
2021-09-17 10:23:43 +03:00
Nekotekina
144244e902
SPU LLVM: implement missing constant mask handling in SHUFB
2021-09-17 10:23:43 +03:00
Nekotekina
7cf9d1380b
LLVM DSL: add line number in get_const_vector automatically
2021-09-17 10:23:43 +03:00
Nekotekina
f188019244
LLVM DSL: reimpelement fsqrt, fabs
2021-09-17 10:23:43 +03:00
Eladash
bd66dfedc9
Do not allow to unpause after fatal error occured in emulation
...
* Plus fix #10590
2021-09-09 19:30:54 +02:00
Malcolm Jestadt
43cc62d267
SPU LLVM: Add m_use_vnni
...
- Alderlake and Sapphirerapids will require an update to the llvm fork before they can be detected
2021-08-31 14:02:05 +03:00
Malcolm Jestadt
d304b52391
SPU LLVM: Add VNNI optimized variant of sumb
...
- Uses vpdpbusd to horrizontally add values, for some reason this is much faster than the normal horizontal add instructions.
2021-08-31 14:02:05 +03:00
Malcolm Jestadt
a86b278115
SPU LLVM: Expand byteswap elimination to more instructions
2021-08-31 14:02:05 +03:00
Whatcookie
c62deeefd4
SPU LLVM: Add approximate FCEQ/FCMEQ ( #8729 )
...
- It's 100% accurate, but will sit under approx xfloat anyways
- Attempts to use a single instruction when 1 value is constant
2021-08-22 10:13:34 +03:00
Nekotekina
05d1b3605e
Fixup for SPU Debug mode (bad SHA1)
...
Should fix crashes due to read out of bounds.
2021-08-01 10:12:08 +03:00
Nekotekina
fc5840cda6
SPU Cache: allow to dump cache upon startup
...
Print also some stats (if SPU Debug is enabled).
2021-07-30 09:21:11 +03:00
Eladash
d81a5b1423
SPU LLVM: Add missing WRCH PC updates
2021-05-29 15:26:52 +03:00
Malcolm Jestadt
7c2b08b9b6
SPU LLVM: Expand branch optimizations for more instructions
2021-05-29 13:07:35 +03:00
Nekotekina
160b131de3
types.hpp: implement smin, smax, amin, amax
...
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.
Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +03:00
Malcolm Jestadt
52780e65e7
SPU LLVM: Optimize branching
...
- Detect a pattern where vpmovmskb and a check against the sign bit can be used instead of checking against zero
2021-05-17 16:59:20 +03:00
Eladash
cacb852a1e
Emulation stopping bugfix
2021-05-14 15:35:07 +03:00
Nekotekina
6dca588370
SPU LLVM: improve MPYH instruction
...
Rewritten to use 16-bit multiplication, as in SPU ASMJIT.
2021-05-13 23:16:53 +03:00
Megamouse
1caf81811a
Move unspecific Emulator code out of System.cpp
2021-04-24 11:21:22 +03:00
Nekotekina
67649d7976
SPU LLVM: restore lost comment
2021-04-21 13:33:44 +03:00
Malcolm Jestadt
6247969ede
SPU LLVM: Absolute final fixes for icelake shufb paths
...
- The constant mask was accessing bits in reverse order of what was expected
2021-04-21 11:00:02 +03:00
Malcolm Jestadt
efd38fa940
SPU LLVM: Improve byteswap elimination
...
- Use the data before it has been swapped rather than relying on a second byteswap to cancel out the first
2021-04-20 23:24:21 +03:00
Malcolm Jestadt
551472220e
SPU LLVM: Remove icelake shufb paths for now
2021-04-20 23:24:21 +03:00
Malcolm Jestadt
53f13a9721
SPU LLVM: Final fixup for icelake shufb paths
...
- The cause of the problems was due to the constant mask for gf2p9affineqb being used as the first argument, instead of the second argument.
2021-04-20 13:07:24 +03:00
Nekotekina
9d4fcbf946
bs_t<>: fix/cleanup some operators
2021-04-17 15:54:33 +03:00
Malcolm Jestadt
0a7df9d02e
SPU LLVM: add AVX-512 SPU verification
...
- This is hidden behind a new setting, as some cpus may downclock agressively when executing 512 wide instructions
2021-04-16 09:35:26 +03:00
Megamouse
a16d8ba3ea
More random changes
2021-04-11 14:01:51 +03:00
Megamouse
03b76b4606
Emu: some cleanup
2021-04-09 21:03:49 +02:00
Nekotekina
95725bf7fc
Add -Werror=missing-noreturn (GCC, clang)
...
May be useful to diagnose functions which fail assertions unconditionally.
2021-04-08 10:29:47 +03:00
Megamouse
02febd3f65
Workaround: Skip progress_dialog during gameplay
2021-04-06 21:39:34 +03:00
Nekotekina
6f1f75bc8f
Minor progress dialog refactoring
...
Add rsx::overlays::progress_dialog class (identical to message_dialog).
Don't use Emu.CallAfter() for native dialogs.
Make g_progr_ptotal waitable.
2021-04-03 22:38:04 +03:00
Nekotekina
e9a45a2f45
Implement scoped_progress_dialog
...
Create Emu/system_progress.hpp
Remove atomic g_progr_show
2021-03-31 23:40:09 +02:00
Nekotekina
2212a131ef
Fix some -Weffc++ warnings (part 1)
2021-03-31 11:27:09 +03:00