feat(libc): export isnanf and __signbitl #3640
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3640"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T14:35:22Z.
What
Exports the missing
isnanf(3pF7bUSIH8o) and__signbitl(Cj81LPErPCc) functions fromlibSceLibcInternal. XPSemu's import audit lists one reference to each; the following unresolved-import stops are predicted from registry order and have not been observed in a game run:isnanfforwards to the existing__isnanfimplementation.__signbitlreturns exactly 0 or 1 using the host's x87long doublesign bit, with a compile-time size check for the guest ABI. Tests cover NaN, infinities, finite values, signed zero, and signed long-double NaN. Thanks to @screamm for confirming the imported NIDs, recording the FreeBSD 11.4 references, and identifying these XPSemu imports in #3624.Tested
guest_math_tests;guest_mathpassed three consecutive runs.python3 tools/check_conventions.py --base upstream/mainandgit diff upstream/main --checkpassed.Checklist
main; no other open PR implements these functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T14:35:46Z.
Progress report (
a11c8f7→e7c20b3)📈 System libraries: 85.82% (+0.01%, +2 implemented functions)
✅ 2 implemented
__signbitl_nid_postfixisnanf_nid_postfixImported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T15:19:51Z.
Independent pre-review on Linux (full CI runs only happen on manual trigger, so recording one): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON.tools/check_conventions.py --base origin/mainpasses.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T19:28:55Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/tests/GuestMath.cppL442core/libs/tests/GuestMath.cppL38-39, L418Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-11T22:46:17Z.
I checked this PR on both OSes with Dusklight (PPSA99305, catalog build). With #3598 (
logb) merged, Dusklight's next stop onmain5aaf26bdisisnanf:undefined symbol: 3pF7bUSIH8o (isnanf)FAIL: unresolved ELF import 3pF7bUSIH8o (isnanf) from libSceLibcInternal.prxisnanfresolves and the next stop isposix_spawnattr_init(44hlATrd47U, in your #3651) on both:undefined symbol: 44hlATrd47U (posix_spawnattr_init)mainbuilds):FAIL: unresolved ELF import 44hlATrd47U (posix_spawnattr_init) from libSceLibcInternal.prxguest_mathpasses 5/5 (--repeat until-fail:5) on both. No warnings inMath.cpporGuestMath.cpp.