feat(libc): implement nextafterf #2934
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2934"
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 reyani-dev on 2026-10-10T18:33:56Z.
Resubmission of #2192, which was closed because no title was shown stopping on it. The title evidence has since been posted there by @babyhuey (run):
On
mainc963432d, Stremio Plus (PPSA74126) stops atnextafterf(3m2ro+Di+Ck): WindowsFAIL: unresolved ELF import 3m2ro+Di+Ck (nextafterf) from libSceLibcInternal.prx, Linuxundefined symbol: 3m2ro+Di+Ck. With this change it moves on to_fstatfs.The function is still absent on current
main, and no open PR implements it. The branch is rebased onto currentmain. Windows 11 (WinLibs GCC 15.2.0), Release:guest_mathpasses 3/3,check_conventions.pypasses, andpr_overlap.pyreports no overlap.What
Exports
nextafterfnext toremainderf. It forwards tostd::nextafteronfloat, so it steps by onefloatULP toward the second argument.Title: PPSA74126 Stremio Plus imports it from
libSceLibcInternal(resolved throughlibc.prx), per the #1578 audit. I haven't run the title.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Release,
-DBUILD_TESTING=ON:guest_math_tests, next toscalbnf:0x1.000002p0f,0x1.fffffep-1f);denorm_minfrom 0, and back to 0;x == yreturnsy, sonextafterf(-0, +0)is+0;FLT_MAXtoward infinity gives infinity;doubleand casting back (which returnsxunchanged), or returningxwhenx == y, each makeguest_mathfail.cmake --build build --target libs: the patchedlibc.prxexports3m2ro+Di+Ck.tools/check_conventions.pypasses, andtools/pr_overlap.py --branchreports no overlap.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-10T18:57:16Z.
Full Linux and Windows builds and tests for this head (
fc828e19), using the project's Build workflow. I can't start the upstream manual run, so I ran the samebuild.ymlin my fork through a mirror PR. Like the upstream run, the jobs check out the PR head merged into currentmain(bf6e25a1):ctest: 703/703 passedctest: 711/711 passedRun: https://github.com/AchrafReyani/AnyPS5/actions/runs/38076406934
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T19:01:22Z.
Progress report (
1476f76→fc828e1)➖ System libraries: 84.56% (+0.0%, +1 implemented functions)
✅ 1 implemented
nextafterf_nid_postfixImported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-10T19:09:34Z.
Heads-up so the evidence here isn't read against the wrong layout: the runs of mine linked in the description are from
mainc963432d, before #2605. Since #2605 each title'ssce_module/libc.prxhas to be unwrapped, and that module is the SDK shim whose exports point 1872 libc functions at one return-0 stub (#2652). So on currentmain(9c5d67fb, catalog run with the module unwrapped) Stremio Plus (PPSA74126) stopped at_fstatfs(now merged in #2858) instead ofnextafterf. The stop comes back once the shim's return-0 exports are left out, which is what the closed #2705 did; its table lists Stremio Plus atnextafterf(3m2ro+Di+Ck).Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-10T19:17:32Z.
Thanks @babyhuey, that's an important caveat. These titles' imports declare
libSceLibcInternal, so on currentmainthey bind to the bundled SDK shim's return-0 export (#1497/#2652) instead of failing at load, which hides the stop. Once #1529 keepslibSceLibcInternal-declared imports host-bound, the stop comes back, as the closed #2705 table showed. Either way, these titles call the real function, so onmainthey currently get 0 from it.