Skip to content

feat(libc): implement abs - #2316

Closed
itsbo5 wants to merge 1 commit into
boykopovar:mainfrom
itsbo5:feat/libc-abs
Closed

itsbo5 wants to merge 1 commit into
boykopovar:mainfrom
itsbo5:feat/libc-abs

Conversation

@itsbo5

@itsbo5 itsbo5 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What

Identifies NID Ye20uNnlglA as abs in libc and implements it under abs_nid_postfix in Math.cpp. Removes the unknown stub from Export.cpp and adds unit tests in GuestMath.cpp.

Tested

GuestMath unit tests covering abs_nid_postfix with positive, negative, zero, and boundary integer values.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
#2301 core/libs/prx/libc/Export.cpp L45-53

@github-actions github-actions Bot added the libc label Oct 9, 2026
@Kikoarl

Kikoarl commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at 5ceff58e:

  • Build: Built cleanly in RAM (/tmp/anyps5_build) with zero warnings/errors.
  • Conventions: python3 tools/check_conventions.py --base origin/main --head HEAD -> PASS (0 errors).
  • Verification: Verified GuestMath.cpp tests for abs. Cleanly exposed in libc exports following standard POSIX/C library behavior.

LGTM!

@popcoder565

Copy link
Copy Markdown
Contributor

Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 5ceff58e, merged onto main f8c2f07 in one build with 9 other PRs that had no Windows run.

No title was run.

🤖 Addressed by Claude Code

@DariusHQ DariusHQ mentioned this pull request Oct 9, 2026
9 tasks done
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: no title is shown to stop at abs (Ye20uNnlglA) on main, the same reason #1952 and #1981 were closed. Reopen with the not implemented line from main when a title reaches it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants