feat(libSceFreeType): implement fixed-point arithmetic #9410
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9410"
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 Felipebmaitan on 2026-10-21T21:04:54Z.
What
Implements the six signed 64-bit guest exports
FT_MulDiv,FT_MulFix,FT_DivFix,FT_RoundFix,FT_CeilFixandFT_FloorFix. The guest uses the existing LP64 adapter ABI on Linux and Windows.FT_MulDivandFT_DivFixwrap their unsigned intermediates at 64 bits and return a signed0x7fffffffon division by zero.FT_MulFixnarrows both inputs and its result to signed 32 bits. The remaining functions round halfway away from zero, toward positive infinity or toward negative infinity, respectively. FreeType 2.13.3 arithmetic · x86-64 helperThe NIDs follow the PS5 3.20 inventory. Console signatures, build options and wider-input results remain unverified and are recorded in the FreeType debt fragment. PS5 3.20 inventory
Integrated published head
ed1945bc86b5332f1b53c36017bf07a691695bc3and currentmainate481b135558fc4316bc3b24e7408156737eff08dthrough merge commits. The regression test now models bundled FreeType 2.15.0's wrapped 64-bit product and rounding addition for the native LP64FT_MulFixassertion. The same strict native assertion applies to system FreeType because currentmainrequires version 2.15 or newer. Every guest value is checked against the existing guest oracle. FreeType 2.15.0 helperThe six-name scan found #16823 in
libSceFreeTypeOt. That PR declares #9410 as its prerequisite. The #9848 candidate at2590e6f55418484bd104ee772644256a3ea1bea4combines cleanly with this branch and preserves both test registrations and debt fragments.Tested
Validation for
29c150a49a1469cb271d5da023b5640c6b0d6744used at most two compiler jobs.guest_freetype_arithmeticCTest passed in 2.07 s. The prior test reproduced juanpimg's Nov 9INT64_MINmismatch against the same executable. The corrected test passed 470,982 triples and 2,825,892 results each for guest and native LP64 FreeType.libSceFreeType,libkernelandlibc. Each smoke run loaded all three modules with zero failures. All six raw arithmetic NIDs passed 2,825,892 guest comparisons per host. The packaged Linux harness also passed 2,825,892 native LP64 comparisons.9fb2d9bb83. juanpimg's Linux failure was on the previous head merged ontod792f1ad5f. The final-head runs above were executed separately.Full hosted Linux and Windows builds require collaborator dispatch. Console and title behavior remain unverified.
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 ycbuzi on 2026-10-21T22:41:42Z.
Windows run of
5bf11d7a86merged ontomaina6dcea9279(ec2f82dee0, clean), the platform the description lists as not tested. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release,BUILD_TESTING=ON.Built
libSceFreeTypeandguest_freetype_arithmetic_testswith no errors or warnings.ctest --repeat until-fail:2onguest_freetype_arithmetic: passes on both repeats. That test runstest_guest_freetype_arithmetic.pyagainst the executable. Not run: a title.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T05:10:16Z.
Review: CHANGES_REQUESTED
The arithmetic implementation and regression coverage are detailed. I independently compiled the exact added
Arithmetic.cppwith C++20,-Wall -Wextra -Werror, then ran the PR's Python oracle against a small harness: 470,982 input triples and 2,825,892 guest results matched. I repeated that run under UBSan with no diagnostics. This was a source-level harness, not the packaged library/CMake integration test or a Windows/PS5 run. I also searched the live open PR queue for all six exports; no duplicate implementation is open. The newer FreeType trigonometry PR #9574 changes different exports and its merge with this branch is clean.The remaining blocking repository-rule issue is freshness: this head's merge base is
0c6a5bd5938f, 423 commits behind currentmain(da54c652e30b), while the checklist says it is based on current main. Please rebase on currentmain, refresh the conventions and overlap checks, and rerun the focused FreeType/package tests on the rebased head. The existing Linux/Windows reports are useful evidence for this head, but do not validate a rebase onto today's tree. The hosted product jobs are skipped on this PR, as expected from the current workflow policy.AI assistance was used to prepare this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T19:44:55Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the author has no required follow-up.
What I ran
Reviewed head
29c150a49a1469cb271d5da023b5640c6b0d6744. I did not run commands;repo_read.pywas unavailable through the provided tools. The PR description reports Linux and Windows test runs, but I did not independently verify them.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No changed files were excluded: the manifest lists six changed files, all included, and I read each one. Automated test results and console behavior were not independently verified.
To get this to a good state
Nothing is required.