Commit graph

381 commits

Author SHA1 Message Date
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
Megamouse
870224cde0 Emu/overlay: ingame native overlay PPU compilation 2021-03-31 09:38:30 +02:00
Nekotekina
b3fb6d7d18 Add and fix -Wredundant-decls (GCC) 2021-03-23 22:48:57 +03:00
Nekotekina
a4fdbf0a88 Enable -Wstrict-aliasing=1 (GCC)
Fixed partially.
2021-03-09 03:10:15 +03:00
Nekotekina
53af2dbb3f Add/fix warning -Wignored-qualifiers (GCC/clang)
Fix simple_array::const_iterator as a part of it.
2021-03-09 03:09:50 +03:00
Malcolm Jestadt
e5d0e035d0 SPU LLVM: Rearange FM instruction for better performance
- Doesn't eliminate any instructions, but allows for better out of order execution.
2021-03-08 15:48:36 +03:00
Nekotekina
87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Eladash
004ebfdaee SPU debugger: Implement MFC journal
* Allow to dump up to 1820 commands with up 128 bytes of data each, using key D with the debugger.
2021-03-02 21:57:51 +03:00
Nekotekina
ea5e837bd6 fixed_typemap.hpp: return reference 2021-03-02 16:08:14 +03:00
Nekotekina
a90ad62fc0 Remove garbage SPUW perf report 2021-02-23 18:24:50 +03:00
Eladash
96400234a8 Remove cpu_thread destructor 2021-02-22 12:47:45 +03:00
Eladash
f43260bd58
Atomic waiting refactoring (#9208)
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117)
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Nekotekina
d0126f0fa0 Fix freezes in HLE Vdec and SPU LLVM precompilation.
Freezes could accidentally occur on close or ingame.
Deprecate range-for loop on lf_queue.
This is a part of PR #9208

Co-authored-by: Eladash <elad3356p@gmail.com>
2021-02-01 19:14:01 +03:00
Megamouse
7bddb87306 Simplify compile threads 2021-01-31 12:18:32 +03:00
Eladash
d3bc96a201 Fix minor issue with usage of STL thread::hardware_concurrency() 2021-01-29 18:23:29 +03:00
Eladash
0652870204 New RSX Debugger 2021-01-28 17:40:26 +03:00