Skip to content

test(libc): exercise division returns through patched PRX - #12782

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
StoneDC:b40/division-prx-abi
Nov 2, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
StoneDC:b40/division-prx-abi

Conversation

@StoneDC

@StoneDC StoneDC commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

What

Adds typed dynamic calls to div/ldiv/lldiv/imaxdiv through both the real unpatched libc PRX and its NID-patched output, checking quotient/remainder fields and caller guards. The standalone test target explicitly depends on the existing patched-libc output rule.

Implementation basis and limits: canonical APS5_VABI declarations and independent Python toward-zero quotient/remainder golden pairs (148 calls per module). No extra export declarations or guessed field offsets are introduced. Zero divisors and MIN/-1 overflow are excluded. NID lookup uses the project helper, so this does not independently certify that algorithm or PS5 caller ABI/layout; it verifies the built library/declaration boundary.

Integration review: the exact topic head was checked with the repository overlap tool against main 14b3441f3d543b0e3a60d5f0fcf51e49fa14b305. The tool reported shared CMake registration files in older PRs that already conflict with main: #5021, #7275, #8650, #9019, #9156, #9293, #9297, #9302, #9383, #9571. Their scoped file diffs were reviewed separately. 7 file comparisons could be projected onto the audit base and then combined with this topic without a new file conflict. 3 peer file changes already conflict with main and are not described as automatically mergeable; their registration changes were inspected directly. These peers do not provide this feature or test matrix. This uses a separate test/registration block and has no functional landing-order dependency. If a shared registration file changes before landing, this branch will need its affected merge and test checks refreshed. All 20 topic commits also merged independently into current validation main 4c7d275bef89d309313d16bc2bc05d37a1b50be2; their combined integration 2a0489dd307a9c98b9b353ea7282b65809db07dd was built and tested. Depends on: none; no other candidate branch is required to build or exercise this change.

Tested

guest_division_prx_abi passed with actual dynamic loading and NID-patched libc on Linux and Windows, no skips. Windows standalone-target validation exposed and resolved the need to generate patched libc explicitly; success was rechecked through real function results rather than symbol presence alone.

Topic head: 4022b2f1cda81b3a3b77cb1dfdb452e297d2f4dd, based on f88c86bf6cdd2c74bcdb31e45ba877d4993e62e5. Local platforms: Ubuntu/WSL GCC 15.2, CMake 4.2.3, Python 3.14.4; Windows MinGW GCC 15.2, CMake 4.3.1, Python 3.14.3. Applicable conventions, whitespace, script registration and current-main three-way merge checks passed. Linux full-product builds and subsequent focused library rebuilds were performed; Windows used the full configuration and the affected library/test targets. The combined 11 system-library CTests passed on both platforms. No game or PS5 measurement is claimed; macOS and hosted full-build CI are not reported as passed.

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 under Silent stubs in their library's technical debt file
  • 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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@oneandonlydean oneandonlydean self-assigned this Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/CMakeLists.txt
PR 7275 core/libs/CMakeLists.txt
PR 8650 core/libs/CMakeLists.txt
PR 9019 core/libs/CMakeLists.txt
PR 9156 core/libs/CMakeLists.txt
PR 9162 core/libs/CMakeLists.txt
PR 9293 core/libs/CMakeLists.txt
PR 9297 core/libs/CMakeLists.txt
PR 9302 core/libs/CMakeLists.txt
PR 9383 core/libs/CMakeLists.txt
PR 9571 core/libs/CMakeLists.txt
PR 12130 core/libs/CMakeLists.txt
PR 12642 core/libs/CMakeLists.txt
PR 13206 core/libs/CMakeLists.txt
PR 13253 core/libs/CMakeLists.txt
PR 13255 core/libs/CMakeLists.txt
PR 13256 core/libs/CMakeLists.txt
PR 14213 core/libs/CMakeLists.txt
PR 14264 core/libs/CMakeLists.txt
PR 14299 core/libs/CMakeLists.txt

@babyhuey

Copy link
Copy Markdown
Contributor

Windows run of this head 4022b2f1cda8, merged onto main ba5b5330b37 (clean merge, local only), with the selection CI's skipped Windows product job uses: Windows 11, Ryzen 7 5800X, RTX 3080, WinLibs GCC 15.2, Release, BUILD_TESTING=ON. The tree was configured fresh after the merge, then select_tests.py select / ninja -f select.ninja selected / --target libs / select_tests.py ctest --parallel 4 --timeout 120.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added the build label Oct 29, 2026
@oneandonlydean
oneandonlydean merged commit b90aa7b into boykopovar:main Nov 2, 2026
10 checks passed
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.

3 participants