mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
Kart PS5 (PPSA99611, Phi1ow/mkwii-ps5 v1.0.0-rc1) stops on it right after __divti3. The related open PR #4037 reports: "with this change it passes `__divti3` and stops at `ELSr5qm4K1M` (`__umodti3`)". PS5CEMU-HAR (PPSA99360) imports it too: tools/import_audit.py lists ELSr5qm4K1M __umodti3 as absent from libSceLibcInternal.prx (registry index 359), so the predicted stop is "FAIL: unresolved ELF import ELSr5qm4K1M from libSceLibcInternal.prx". libSceLibcInternal imports fall back to libc.prx, so the export lives in libc beside __udivti3. compute_nid and aerolib (zecoxao/sce_symbols 2883963a) both give ELSr5qm4K1M = __umodti3. __umodti3 is compiler-rt's lib/builtins/umodti3.c (llvm-project 0ee439b705e82a4fe20e266bc8fea96d0e60e1ec): the remainder that __udivmodti4 leaves. The restoring division of SonyUdivti3 already computes it, so the loop moves to SonyUdivmod128 and both helpers use it. A zero divisor reaches a 64-bit divide in __udivmodti4 and traps on x86-64; this throws instead, as __udivti3 does, and names the dividend. Co-Authored-By: Claude Fable 5.1 <[email protected]>