feat(libc): implement rint and lrint families #2235
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2235"
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 obojeoboje on 2026-10-09T12:38:34Z.
What
Implement nine libc exports:
rint,rintf,rintl,lrint,lrintf,lrintl,llrint,llrintf, andllrintl.The functions honor the active floating-point rounding mode and preserve floating-point exception behavior. Guest
longresults use the hostllrintoverloads to retain 64-bit values on Windows. Extended-precision overloads retain the guest x87long doublerepresentation. Compile only this translation unit with-frounding-math; without it GCC's optimizedrintgives incorrect negative results under directed rounding.Behavior references: FreeBSD rint(3) and lrint(3). Export names are present in the shadPS4 aerolib table.
The progress scanner changes from 2578/3044 (84.69%) to 2587/3053 (84.74%). These are newly declared exports, so both counts grow.
Tested
Windows, WinLibs GCC 15.2, Release build with testing enabled. No game tested.
libstarget passed.guest_video_out_wqhd_detection_no_vulkan), zero failures; 37.64 seconds total.FE_INEXACT, invalid integer conversions (FE_INVALID), results beyond 32 bits, integer boundaries, and extended precision beyond double. Invalid-conversion return values are deliberately not asserted because they are unspecified.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)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T13:33:30Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libc/CMakeLists.txtL48Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:10:43Z.
Same as #2217, for the
rint/lrintfamily.Pull request closed