docs(debt): cut the long-double Dinkumware entry to _LLog with the bundled libc.prx code #11217
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11217"
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 AlexFigas on 2026-10-25T21:59:38Z.
What
The debt entry for
_LDivide,_LRecipand_LLogsays their exact console results, signaling-NaN behavior and floating-point exceptions are not verified. For the first two, thelibc.prxthat PPSA21564 bundles (sce_module/libc.prx, the library's own code) settles this. Both are one x87 division, the same instructions this libc compiles to:libc.prxlibc.prxbuilt here)_LDivide(x, y)fld xword ptr [rsp+0x18]; fld xword ptr [rsp+8]; fdivrp st(1); retfldt 0x8(%rsp); fldt 0x18(%rsp); fdivrp; ret_LRecip(x)fld xword ptr [rsp+8]; fld1; fdivrp st(1); retfldt 0x8(%rsp); fld1; fdivp; retBoth versions run the same
fdivon the guest thread's x87 control word, so results, NaN handling and exception flags agree. The entry is cut to_LLog, whose code (0x3fd50) classifies its argument and is not compared here.Possible follow-up: the
_Divide,_FDivide,_Recipand_FRecipentry can go the same way. Thatlibc.prxcomputes them asvdivsd,vdivss,1.0 / xand1.0f / x(0x80ab0, 0x81140, 0x80ac0, 0x81150), as this libc does (divsd,divss). I left it for later because #10345 rewrites the line next to it.Tested
Documentation only. I disassembled the functions above in the relinked
libc.prxfrom PPSA21564 and inlibc.prxbuilt here (GCC 13.3, Release).python3 tools/check_conventions.py --base origin/mainpasses.python3 tools/pr_overlap.py --branch docs/libc-dinkumware-division-evidencefinds no overlap.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T22:09:51Z.
Review: APPROVED
Reviewed exact head
eb943993a73394b85adae79053956e1d849dc9cd. The debt change keeps_LLogunresolved while removing only_LDivideand_LRecip. I checked the reported x87 sequence against the implementations (x / yand1.0L / x) and verified the GNU AT&Tfdivpspelling in the table is not directly comparable to the bundled binary's Intel-syntaxfdivrp st(1): assembling the corresponding AT&T sequence confirms the stack operation implements the same reciprocal. The division sequences likewise use opposite load orders, so their reverse divide operations produce the same quotient.git diff --checkand current-main conventions pass. The hosted eligibility, conventions, intake and labels checks pass; all build jobs are skipped for this documentation-only change. The disassemblies were produced by the author from the bundled title library and the locally built library; I did not independently access that title binary. No issue found in the documentation scope.