Commit Graph

226 Commits

Author SHA1 Message Date
oltolm
fcff16b6f7 Fix Clang build and other small fixes (#17736)
1. I fixed the Clang build.
1. I removed what I think is an unnecessary `ptrtoint` in
`rpcs3/Emu/Cell/PPUTranslator.cpp`. I am not 100% sure that it's
correct, but I tested a small LLVM IR snippet and it didn't make a
difference. The ASM code was the same.
1. I also changed the definition of `prefetch_write` from `return
__builtin_prefetch(ptr, 1, 0);` to `return __builtin_prefetch(ptr, 1,
3);` because that's how `_m_prefetchw` is defined in GCC.
2025-11-23 07:11:36 +02:00
Elad
107d9dc533 PPU Profiler 2025-11-19 21:37:50 +02:00
Elad
92e24a5779 PPU/x64: Fix gv_cvtu32_tofs 2025-11-14 21:15:27 +02:00
Elad
29108e1cb4 PPU LLVM: Filter out functions with patches 2025-09-22 17:03:31 +03:00
oltolm
48d3b30204 llvm: use CreatePtrAdd
use CreatePtrAdd instead of CreateGEP(get_type<u8>(), ...) or
CreateIntToPtr(CreateAdd, CreatePtrToInt(...))
2025-08-09 09:41:07 +03:00
oltolm
ac99b2036d llvm: fix deprecation warnings 2025-06-07 12:46:48 +03:00
Vestral
63b7134dce Separate segment and function addresses in PPU LLVM 2025-04-30 02:56:23 +02:00
elad335
87d8bebd0d PPU LLVM: Fixup MTFSF 2025-04-08 11:29:06 +03:00
Ani
16036e0419 ppu: Remove redundant checks on MTFSF
Closes #11176
2025-04-08 07:04:37 +02:00
elad335
bd1f5ff194 PPU LLVM: Fix VMAXFP, VMINFP 2025-04-06 08:58:24 +03:00
RipleyTom
cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01:00
Elad
86b7078464 PPU LLVM: Fix compilation of PRX with no relocations 2025-02-07 20:27:17 +02:00
Megamouse
3187dc816e Fix some warnings 2025-02-02 17:06:39 +01:00
Megamouse
67703b49d8 Update LLVM to 18.1.8 2025-01-25 18:15:13 +01:00
Elad
5a5e475c6e PPU Analyzer: Move ppu_function::callers to lower sizeof(ppu_function) 2025-01-25 12:47:44 +02:00
Elad
857eac3d10 PPU Analyzer: Remove ppu_function::name to lower sizeof(ppu_function) 2025-01-25 12:47:44 +02:00
Elad
9d5b75bb7a LLVM: Slice PPU executable memory 2025-01-25 12:47:44 +02:00
Elad
575a245f8d IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00
kd-11
c80342e8d4 aarch64: Support calloc patch blocks 2024-08-31 13:55:58 +03:00
kd-11
4da30e9eca Add proper transform pass management 2024-08-24 14:13:14 +03:00
kd-11
fbcd8e32b8 Cleanup 2024-08-18 18:27:52 +03:00
kd-11
fc415cf32a Move to a assembler wrapper for injected asm to better handle dependencies 2024-08-18 18:27:52 +03:00
kd-11
bc1b0eb41b Improve comments 2024-08-08 13:40:07 +03:00
kd-11
7979c5d9eb Finalize PPU migration to the frame pass system 2024-08-08 13:40:07 +03:00
kd-11
cba658baba Complete PPU support 2024-08-08 13:40:07 +03:00
kd-11
34549445a8 Migrate PPU to post-process execution model 2024-08-08 13:40:07 +03:00
kd-11
a976ac3353 jit: Add aarch64 JIT backend for pre-codegen transforms 2024-08-08 13:40:07 +03:00
kd-11
56cc5d9355 Initial PPU LLVM implementation for aarch64 2024-08-08 13:40:07 +03:00
Elad Ashkenazi
a2534263fe Savestates/PPU: Ensure correct PPU state on MMIO 2024-07-19 14:31:19 +03:00
Elad Ashkenazi
929be0b4e6 PPU LLVM: Implement OE for few instructions 2024-06-08 14:09:37 +03:00
Eladash
b83e39a540 Fix some warnings 2024-05-04 14:15:51 +03:00
Elad Ashkenazi
ad4216a3fc PPU LLVM: Do not crash on linkage of garbage code 2024-04-26 18:55:50 +03:00
Eladash
3364a46139 PPU LLVM: Remove cast to constant 2024-03-26 21:35:53 +02:00
Eladash
2f822abb47 PPU LLVM: Use symbol resolver function to resolve functions 2024-03-20 12:48:31 +02:00
Eladash
467790c8d8 PPUTranslator: Try to fix a regression 2024-01-01 11:58:00 +02:00
Megamouse
f45cbdd0f7 fixes 2023-12-30 21:14:26 +01:00
Megamouse
7a02787bee fix some more warnings 2023-12-30 21:14:26 +01:00
Eladash
fdbb0b0e2f PPU LLVM: Optimize branch list 2023-09-05 06:20:57 +03:00
Eladash
85773ad869 PPU LLVM: Optimize traps a bit 2023-09-05 06:20:57 +03:00
Eladash
8b212f2169 PPU: Fix LVRX bad memory access 2023-08-17 17:59:45 +03:00
Eladash
e25936c1f1 PPU LLVM/RawSPU: Fixup MMIO crossing-out 2023-08-06 08:26:17 +03:00
Eladash
06c9b95e09 PPU LLVM/SPU/Non-TSX: Obnoxiously responsive and obedient PPU for SPU requests 2023-08-03 15:04:37 +03:00
Elad Ashkenazi
1219e5c244 SPU: Fix static interpreter requirement with interrupts
Removed a wrong condition in PPU LLVM as a fixup.
2023-07-07 22:39:49 +03:00
Eladash
598fe85243 PPU LLVM/RawSPU: Implement MMIO violation elimination pass 2023-07-06 19:46:36 +03:00
Eladash
554b27a82a PPU LLVM: Implement SELF precompilation
Do not use PS3 memory for precompilation.
2023-06-28 18:34:33 +03:00
Eladash
1c36156594 PPU LLVM: Fix LWSYNC according to cellSpursWakeup 2023-06-02 08:54:46 +03:00
Ivan Chikish
22bd7dcc42 PPU LLVM: disable DSE pass and use volatile store/loads 2023-04-14 07:26:30 +03:00
oltolm
6fbca1acfd remove unnecessary pointer bitcasts 2023-04-09 12:45:18 +03:00
Ivan Chikish
fb88e1c1c9 Update to LLVM 16.0.0, switch to upstream LLVM 2023-04-06 10:19:31 +03:00
oltolm
520524285a llvm: update code to new API (#13500)
* llvm: update code to new API

* llvm: remove OLDLLVM define
2023-03-11 01:57:21 +03:00