feat(libc): implement abs #1097
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1097"
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 fardeen-hash on 2026-10-07T10:44:32Z.
What
Implement standard ISO C / POSIX
abs(NIDYe20uNnlglA), replacing thelibcCyberUnknown02stub incore/libs/prx/libc/Export.cppwhich previously aborted onNotImplemented_nid_no_patch("Ye20uNnlglA").PPSA04029), already noted onmainincore/libs/prx/libc/Export.cppamong the Cyberpunk 2077 imports.<stdlib.h>) & POSIX.1 (int abs(int)).libc(/usr/include/stdlib.h), the upstream base for Sony'slibc.prx.aerolib.csv) andtools/nid_names.py, wherecompute_nid("abs")confirms NIDYe20uNnlglA.Tested
Added unit test assertions in
core/libs/tests/GuestMath.cppcovering zero, positive, negative, andINT_MAXcases.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 oneandonlydean on 2026-10-08T03:25:42Z.
Does PPSA04029 call
abson main, or only import it? With the log line where it stops atYe20uNnlglAthis can go in; otherwise I'll close it until a title does.Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:42:21Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
fca59673, merged ontomain8b393b6ein one build with 31 other PRs that had no Windows run.guest_math.guest_offline_imports, broken by #2359 (reported there).No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T21:21:32Z.
Review: CHANGES_REQUESTED
Thanks. Two things before this can land:
abs, or only import it? Please post the log line where it stops atYe20uNnlglA(or equivalent evidence from a run).mainincore/libs/prx/libc/Export.cpp(the neighbouring stubs aroundlibcCyberUnknown02changed). Please rebase.Optional: pin
INT_MINin the test (UB forstd::abs; FreeBSD libc returnsINT_MIN) or say in the description that it is not covered. The Windows run by @popcoder565 (guest_mathpasses) is noted.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T21:36:11Z.
Progress report (
0d3c1ee→fca5967)📈 System libraries: 86.64% (+0.03%, +1 implemented, -1 removed functions)
✅ 1 implemented
abs_nid_postfix🗑️ 1 removed
libcCyberUnknown02Pull request closed