-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPU/PPU LLVM: Fixups and minor optimizations #14616
Conversation
Caution: invalidates cache of some games. |
d18a109
to
ca67304
Compare
I didn't get why it's supposed to invalidate caches? |
Because of the analyzer fixes. |
Hey, Jak and Daxter works again, even the savesates load now(and the precompiling is pretty fast too). |
Confirmed to fix #14600 Starting a New Game on a new profile works again. |
Fixes "Unregistered PPU Function" in "Jak and Daxter Collection"
else if (u32 target0 = (test_op.aa ? 0 : target) + (type == ppu_itype::B ? +test_op.bt24 : +test_op.bt14); | ||
target0 < segs[0].addr || target0 >= segs[0].addr + segs[0].size) | ||
else if (u32 target0 = (test_op.aa ? 0 : target) + (type0 == ppu_itype::B ? +test_op.bt24 : +test_op.bt14); | ||
(type0 == ppu_itype::B || ppu_itype::BC) && target0 < segs[0].addr || target0 >= segs[0].addr + segs[0].size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang produces warnings:
[94/535] Building CXX object rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/Cell/PPUAnalyser.cpp.obj
C:/src/rpcs3/rpcs3/Emu/Cell/PPUAnalyser.cpp:1891:31: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
(type0 == ppu_itype::B || ppu_itype::BC) && target0 < segs[0].addr || target0 >= segs[0].addr + segs[0].size)
^
C:/src/rpcs3/rpcs3/Emu/Cell/PPUAnalyser.cpp:1891:49: warning: '&&' within '||' [-Wlogical-op-parentheses]
(type0 == ppu_itype::B || ppu_itype::BC) && target0 < segs[0].addr || target0 >= segs[0].addr + segs[0].size)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ ~~
C:/src/rpcs3/rpcs3/Emu/Cell/PPUAnalyser.cpp:1891:49: note: place parentheses around the '&&' expression to silence this warning
(type0 == ppu_itype::B || ppu_itype::BC) && target0 < segs[0].addr || target0 >= segs[0].addr + segs[0].size)
^
(
)
2 warnings generated.
@@ -4694,6 +4702,11 @@ bool ppu_initialize(const ppu_module& info, bool check_only) | |||
|
|||
const u64 addr = reinterpret_cast<uptr>(ensure(jit_mod.funcs[index++])); | |||
|
|||
if (func.size == 4 & !BLR_func && *info.get_ptr<u32>(func.addr) == ppu_instructions::BLR()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang produces warnings:
[137/535] Building CXX object rpcs3/Emu/CMakeFiles/rpcs3_emu.dir/Cell/PPUThread.cpp.obj
C:/src/rpcs3/rpcs3/Emu/Cell/PPUThread.cpp:4724:23: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
if (func.size == 4 & !BLR_func && *info.get_ptr<u32>(func.addr) == ppu_instructions::BLR())
~~~~~~~~~~~~~~~^
C:/src/rpcs3/rpcs3/Emu/Cell/PPUThread.cpp:4724:23: note: place parentheses around the '==' expression to silence this warning
if (func.size == 4 & !BLR_func && *info.get_ptr<u32>(func.addr) == ppu_instructions::BLR())
^
( )
C:/src/rpcs3/rpcs3/Emu/Cell/PPUThread.cpp:4724:23: note: place parentheses around the & expression to evaluate it first
if (func.size == 4 & !BLR_func && *info.get_ptr<u32>(func.addr) == ppu_instructions::BLR())
^
( )
C:/src/rpcs3/rpcs3/Emu/Cell/PPUThread.cpp:4748:23: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
if (func.size == 4 & !BLR_func && *info.get_ptr<u32>(func.addr) == ppu_instructions::BLR())
~~~~~~~~~~~~~~~^
C:/src/rpcs3/rpcs3/Emu/Cell/PPUThread.cpp:4748:23: note: place parentheses around the '==' expression to silence this warning
if (func.size == 4 & !BLR_func && *info.get_ptr<u32>(func.addr) == ppu_instructions::BLR())
^
( )
C:/src/rpcs3/rpcs3/Emu/Cell/PPUThread.cpp:4748:23: note: place parentheses around the & expression to evaluate it first
if (func.size == 4 & !BLR_func && *info.get_ptr<u32>(func.addr) == ppu_instructions::BLR())
^
( )
2 warnings generated.
This seems to break the "Unlock all songs and modules" patch in Hatsune Miku: Project DIVA Dreamy Theater extend (and possibly others) when using PPU LLVM. |
May fix #14555
May fix #14600
May fix #14613