Emulator Issues #11778
openARM64 JIT Bug: SD Gundam - Scad Hammers hangs after Level 1 dialogue
0%
Description
RSDJAF - SD Gundam: Scad Hammers hangs after Level 1 dialogue, and random hangs in other level after dialogue.
void JitArm64::fcmpX(UGeckoInstruction inst)
function doesn't work correctly.(fcmpo
, Floating Compare Ordered)
I replace JitArm64::fcmpX
with JitArm64::FallBackToInterpreter
and it work fine.
Files
Updated by degasus over 5 years ago
weihuoya, may you do me a favor and debug a bit more within this instruction?
First, let's check if there is an dependency on the former or the later intstructions. So please insert in https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/Core/PowerPC/JitArm64/JitArm64_FloatingPoint.cpp#L255 this code once in the beginning and in a second test in the end:
gpr.Flush(FlushMode::FLUSH_ALL);
fpr.Flush(FlushMode::FLUSH_ALL);
If flushing the register cache in the begin of the instruction fixes the issue, the bug is likely within some special cases within this instruction.
If flushing in the end of the instruction fixes it, the bug is within another instruction and the bisecting to fcmp is wrong.
If the bug still happens with both flushing, the bug must be within this instruction. So this should be easy to fix.
Afterwards, especially in the first and last case, I'd like to check which of the cases within the instruction are affected. So may you please add in line 267 this code:
FALLBACK_IF(a != b);
or
FALLBACK_IF(singles);
even better would be the full combination of
FALLBACK_IF(a != b && singles);
This should highlight where to search for the issue.
Thanks a lot.
Updated by weihuoya over 5 years ago
- File fallback to interpreter.jpg fallback to interpreter.jpg added
- File flush in the beginning.jpg flush in the beginning.jpg added
- File game hangs.jpg game hangs.jpg added
flush in the beginning: black screen.
flush in the end: nothing changes.
with FALLBACK_IF(singles && a != b && inst.SUBOP10 == 32);
in the beginning, fix issue.
Updated by weihuoya over 5 years ago
FALLBACK_IF(singles && a != b && inst.SUBOP10 == 32);
wiil cause metroid prime black screen. https://www.youtube.com/watch?v=8V_0z_5y7WA&feature=youtu.be
change to
FALLBACK_IF(a != b && inst.SUBOP10 == 32);
fix metroid prime.
Updated by flacs almost 5 years ago
Not sure this is the same bug but fcmpX() does not seem to distinguish between fcmpo and fcmpu.