Repository navigation
feat(libc): implement llroundf - #2933
Conversation
Export it next to lroundf and llround, rounding halfway cases away from zero into the 64-bit guest long long. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Full Linux and Windows builds and tests for this head (
Run: https://github.com/AchrafReyani/AnyPS5/actions/runs/38076401894 |
|
Heads-up so the evidence here isn't read against the wrong layout: the runs of mine linked in the description are from |
|
Thanks @babyhuey, that's an important caveat. These titles' imports declare |
The original fix predates llroundf, which was added in boykopovar#2933. Use the same guest range and exception behavior for the fourth wrapper and include it in the edge-case checks.
The original fix predates llroundf, which was added in boykopovar#2933. Use the same guest range and exception behavior for the fourth wrapper and include it in the edge-case checks.
Resubmission of #2189, which was closed because no title was shown stopping on it. The title evidence has since been posted there by @babyhuey (run):
On
mainc963432, OpenRCT2 Native Port (PPSA99728) stops atllroundf(eQhBFnTOp40): WindowsFAIL: unresolved ELF import eQhBFnTOp40 (llroundf) from libSceLibcInternal.prx, Linuxundefined symbol: eQhBFnTOp40. With this change it moves on toatol.The function is still absent on current
main, and no open PR implements it. The branch is rebased onto currentmain. Windows 11 (WinLibs GCC 15.2.0), Release:guest_mathpasses 3/3,check_conventions.pypasses, andpr_overlap.pyreports no overlap.What
Exports
llroundfnext tolroundfandllround, which round the same way: halfway cases away from zero, into a 64-bit result.Title: PPSA99169 RetroArch imports it from
libSceLibcInternal(resolved throughlibc.prx), per the #1578 audit. I haven't run the title.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Release,
-DBUILD_TESTING=ON:guest_math_tests, next to thellroundcase:±2.5f);-0.4f→ 0;2^33,-2^62);0.49999997f→ 0, whichfloor(x + 0.5f)gets wrong because the sum rounds up to 1;16777215.f.floor(x + 0.5f)and the hostlround(32-bitlongon Windows) each makeguest_mathfail.cmake --build build --target libs: the patchedlibc.prxexportseQhBFnTOp40.tools/check_conventions.pypasses, andtools/pr_overlap.py --branchreports no overlap.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)🤖 Generated with Claude Code