libc: sinhf and asinl are absent, first stops of Ruffle and RetroArch on main; bit-exact ports ready #3519
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 screamm on 2026-10-11T12:10:31Z.
libc (libSceLibcInternal) does not export
sinhf(NID1t1-JoZ0sZQ) orasinl(NIDNx-F5v0-qU8). On currentmain0f863c10(fresh Windows relink,--windows --registry unused-filter=0) Ruffle Flash (PPSA68091) stops onsinhfand RetroArch (PPSA99169) onasinl:Fix branch ready:
screamm:feat/libc-sinhf-asinl(two commits onmain0f863c10:80ee7d83feat(libc): implement sinhf,62c4c7c3feat(libc): implement asinl). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commits as they are. The closed #1702, #2037, #1405 and #2271 were host one-liners; this is different.libc.prxbundled with PPSA28319 holds real code forsinhf(0x51d70) andasinl(0x429f0) under these NIDs; it was disassembled and run on this machine through a harness and compared with the ports. The console code is FreeBSD msun plus a Sony errno helper.sinhf: a port of the older msune_sinhf.c(FreeBSD5aa554c7) with theexpm1f/expfpaths it reaches from stable/9 (59bc2f09); a host-expfversion differed from the console on 4% of inputs by up to 4 ULP, the port matches on all 2,238,032,378 finite inputs up to the overflow threshold; above it errnoERANGEand±infwithFE_OVERFLOW; NaN and±infreturnx + x,±0keeps its sign.asinl: a port ofe_asinl.cwith the ld80invtrig.ccoefficients (9f043204), whose 80-bit constants the console binary holds; matches on 20 million random arguments in (-1, 1) plus the branch edges;±1gives±pi/2rounded to 64 bits;|x| > 1,±infand NaN raiseFE_INVALID, set errnoEDOM(NaN too, a Sony quirk) and return NaN. Nothing throws.guest_mathpins exact bits for every branch, sign and boundary plus the errno and floating-point flag behaviour. TechnicalDebt gets one bullet per function, including a finding beyond this change: on Windows a guest thread started with_beginthreadexruns the x87 unit at 53-bit precision, so everylong doubleexport is less precise in guest threads than on FreeBSD (64-bit); that belongs in guest thread creation.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs:guest_math3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"533/534, the one failure beingwindows_exceptions(#3411); withmain'sMath.cppthe extended test fails;tools/check_conventions.py --base mainandgit diff --checkpass. Not run on Linux, no title run.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T13:08:35Z.
Independent verification on Linux (the gap noted in the report): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON.59bc2f09onto currentmain: applies cleanly, no conflicts.tools/check_conventions.py --base origin/mainandgit diff --checkpass.The rebased branch is available at
blawesom:verify/3519for anyone carrying — the commit is otherwise unchanged.Imported from boykopovar/AnyPS5. Originally posted by orishamir on 2026-10-11T13:15:45Z.
RetroArch half on Windows: catalog build 1.0.0-beta.1 (sha256 checked,
eboot.binandsce_module/libc.prxunwrapped), relinked with--windowsonmaina11c8f7f; Windows 11, RTX 4080, WinLibs GCC 15.2.0 r7, Release. Onlylibc.prxdiffers between the two runs.main:FAIL: unresolved ELF import Nx-F5v0-qU8 from libSceLibcInternal.prx(asinl)Math.cpp(62c4c7c3):FAIL: unresolved ELF import KvOHPTz595Y from libSceLibcInternal.prx(atanl)So RetroArch gets past
asinl, and its next stop isatanl, one of the 43 exports of the closed #2271. For the Ruffle half, babyhuey's Linux run on #1702 shows Ruffle pastsinhf(with #1702's line) and on topause(#3552).AI-assisted: yes (Claude Code Opus 5.5 xhigh)
Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-11T16:01:31Z.
@screamm opened your branch as #3725, with both commits and your authorship unchanged, cherry-picked onto
maina11c8f7without conflicts. On Linux with the catalog builds: Ruffle Flash gets pastsinhftopause, and RetroArch gets pastasinltoatanl. The rest of RetroArch's math imports (atanlthroughtruncl,logb,remainder) are in #3598. With both PRs merged, RetroArch reachespausetoo. I closed my ownsinhf(#3597) and droppedasinlfrom #3598 in favour of your ports. If PPSA28319'slibc.prxalso has real code for any of the #3598 functions, a bit-exact check like the one you ran would be welcome.Imported from boykopovar/AnyPS5. Originally posted by Recapi on 2026-10-12T15:07:13Z.
#3725 is merged (
2c6e3f53,5f3fb3dd, @screamm's commits unchanged), sosinhfandasinlare onmainas your bit-exact ports. Thanks for the rebase. This issue can be closed.