feat(libSceLibcInternal): implement floating-point word access #13782
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13782"
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 dr-hoseyn on 2026-10-31T06:07:07Z.
What
Replace six throwing LibcInternal import stubs with typed
_Plsw,_Pmsw,_FPlsw,_FPmsw,_LPlswand_LPmswword-pointer accessors. Return writable addresses within binary64, binary32 or padded 80-bit extended guest storage without reading or modifying it. The extended most-significant word is at byte 8, not at the end of the 16-byte storage. Null pointers throw. Public declarations are covered by the library umbrella.The CTest executable links the actual production libSceLibcInternal DLL. It checks pointer identity, input preservation and writes for signed zero, subnormal, normal, infinity and NaN binary32/binary64 representations, extended storage/padding preservation, and null rejection for all six exports.
PS5 contract evidence: the word-selection model and signatures follow the referenced Dinkumware sources, and the extended layout agrees with the existing runtime, but no native PS5 measurement or retail-title validation is claimed. This is six exports, not a large coverage milestone.
Tested
Updated against upstream main at
e65fe03113in0f7f048c30. Preserved the upstream power exports and kept the six word accessors as the only replacement exports. Corrected the malformed padding range flagged in review. The branch passed the local conventions and whitespace checks. The Windows results below are from the earlier production DLL build.Windows, WinLibs GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON, head
b8e7051061:libSceLibcInternaland its libc/libkernel dependencies, plusguest_float_words_tests.ctest --test-dir C:/Users/etm/.anyps5-build -R ^guest_float_words$ --output-on-failure: passed, linking the production library exports.Overlap review: the initial scan reported shared CMake/debt lines with #13724 (mutexes). Relocated the CMake registration and clarified the imported-name inventory without editing the shared name-list lines.
git merge-tree --write-tree HEAD refs/pr/13724now succeeds without conflicts. #5021, #11750 and #11751 conflict with main; their added library code was manually checked and implements none of these word helpers or NIDs. A current open-PR name search found no_LPlsw/_LPmswimplementation. The existing throwing exports are removed here rather than duplicated.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 jotitadev on 2026-10-31T09:36:46Z.
Review: COMMENTED
Linux run of head
b8e705106, merged (--no-commit) ontomain809c7fa2df. Ubuntu 26.04 (kernel 7.0), GCC 15.2.0, CMake 4.2.3, Ninja, Release,BUILD_TESTING=ON, i7-8700.guest_float_words(linked against the productionlibSceLibcInternal) passes 3/3.public_headers: 65/65. Related subsetguest_math|guest_float|guest_floating|libc_internal|LibcInternal|guest_trig|guest_libc: 16/16._Pmswoffset+ 6changed to+ 4makes it abort 3/3; athrowat the top of each of the six exports also aborts it 3/3.main+ #13778 + #13782 + #13835 (sharedCMakeLists.txtwith #13778;Export.cppandlibSceLibcInternal.hppwith #13835) merge cleanly; full build ok, the same subset 17/17 three times,public_headers65/65.Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.