fix(libc): compute remainder and remquo with fprem1, as titles' libc.prx does #10349

Merged
JJenkx merged 2 commits from upstream-pr/10349 into main 2026-11-04 04:48:30 +00:00
JJenkx commented 2026-10-23 18:47:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-23T18:47:45Z.


What

remainder, remainderf, remquo and remquof returned the host's functions. The libc.prx that titles ship does not use msun's C versions for these. It uses FreeBSD's amd64 assembly, e_remainder.S, e_remainderf.S, s_remquo.S and s_remquof.S: an x87 fprem1 loop. That differs from the host's results in three places:

  • remquo's quotient: the assembly stores the sign and the three low bits of the quotient, from C0, C3 and C1. For example, remquo(1e300, 1e-300) gives a quotient of 2 there and 8,054,146 on Windows (UCRT). Both are allowed by C, but titles see 2.
  • NaN results: the x87 unit picks between two NaN operands by significand, and a zero divisor or an infinite dividend gives the x87 default NaN 0xfff8000000000000. For example, remquo(1, 0) and remquof(1, 0) are negative NaNs there and positive ones on Windows.
  • errno: Sony's wrapper sets EDOM for a zero divisor or an infinite dividend when neither argument is a NaN, and leaves it alone otherwise.

Against 4,000,196 sampled pairs, main differs from the titles' copies on 1,548 remainder pairs, 2,910,271 remquo pairs and 2,388,665 remquof pairs. It matches on remainderf.

All four now run the same fprem1 loop in one helper. GCC's documented "=t"/"u" constraints are used for it, as in its fprem example. remquo and remquof take the quotient bits from the status word as the assembly does, and all four set EDOM by that rule.

Tested

Current-main integration (2026-11-02): 904fbdca7e9fa6f54f2f70af6724304d9ad7113f includes main a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8 and retains the existing public commits. Conflicts preserve main’s math implementations, regression checks and debt entries alongside this topic. Linux x86-64 Release, GCC 16.2.1: rebuilt libc and the three math executables; guest_math, guest_math_exact and guest_dinkumware_internals each pass three times (9 passes, zero skips), and public_headers passes. The same baseline groups pass on main; conventions and whitespace pass. Source and dependency blobs, executable/library hashes, raw logs and JUnit are retained. This refresh adds no new console, Windows, title, GPU or numerical-reference measurement. Qualification evidence, SHA-256 22866bd2a060ba69cd4387d471605afe20ed644e3257174b2d1488635f8c9b52 (download verified).

Current-main conflict qualification (task 2026-11-01; execution UTC recorded in logs). Published exact head 3ae4cd1429f670352b038174a45719759bf0ead1 is linear above pinned main 93dbd0f82aea684e95f15f06e7d42c0064af18cf. One topic commit on current main, with original JJenkx authorship preserved. All measured remainder/remquo helper bodies and the existing remainder regression are unchanged. The test conflict preserves main’s complete tanhf/expm1f fixtures and adds the exact existing remainder fixture once; all current-main debt remains.

Actual Linux libc and selected test executables rebuilt from the final public input tree. guest_math, guest_math_exact, guest_dinkumware_internals each passed three consecutive runs: 9 runtime passes, zero skips, plus public_headers. Conventions against pinned origin/main and whitespace pass. The same pinned main passes all ten selected numeric/formatting/stream/CRT/string groups three times (30 passes), plus public_headers. Source and public-header blobs, preserved fixtures, commit authorship, source cleanliness, explicit old-SHA push leases and postpush head checks are attached. 33 recursive dependency trees / 18,032 tracked blobs verify before/after with zero errors; QuickJS’s update=none test262 corpus is explicitly excluded and is not a libc build input.

Environment: Linux-7.2.11-arch1-1-x86_64-with-glibc2.44, Ryzen 9 7950X, GCC16.2.1, Ninja Release, BUILD_TESTING=ON. This is focused Linux CPU qualification; earlier Windows/module/reference reports keep their original pins. No fresh Windows/macOS, SDK-module, console, title/GPU or performance execution is claimed. AI-assisted: yes (Codex).

Evidence: https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/math-three-main93db-linux-20261101.tar.gz; SHA-256 e2f9eeee734f73fd6a3a7e944c742e860c04d937accff9b4bb532229fb38df6a.

Earlier dated qualification and reference reports below remain historical at their recorded source pins.

Current-main conflict refresh, 2026-10-27 UTC: exact head 436622ee3c3de1779d6a513b015d5f78687209b5 on tested main 74acfad65b3f0fd4eab653f3a3989d298fba1157. Resolved overlapping test/debt context while preserving this branch's authored production/test edits and main's nextafter environment implementation and coverage. Existing prerequisite commits remain in their original series order.

Linux focused rebuild of libc and selected test executables passes guest_math and guest_math_exact, each three times: 6 passes, zero skips. Conventions and whitespace checks pass. Final fetched main cb45ae2ddf6e113a4619e8fed91fe7b9333c5c0f merges cleanly; its later change is an unrelated Windows crash-test pattern, and the executed qualification remains pinned to the stated base. No new Windows, console, GPU, title, full-suite or negative-control run is claimed. Earlier reference/Windows evidence keeps its original pins.

Exact pins, branch patches, preservation proofs, build/test logs, JUnit and lease-push receipts for this refresh batch. SHA-256: e33f98cc467f038af662cc5fa491c3acc1806bb47171cf77b748f0d4d052c1f2; downloaded copy verified.

Refreshed onto main 8a29e0883470b827f7eb7081196d0518c2aef0ec as 63b201aac1dec7669e71792184ee890ec962412f, one topic commit with no merge commits. The only conflict was an additive debt-file append: main's child-process registry entry and this PR's remainder/remquo entry are both retained. All seven production/helper function bodies and CheckRemainderConsoleBits are byte-identical to previous public head 70b22d401552ac3c90dc85826e42bc8d9de7031b.

Fresh Linux libc, guest_math_tests and guest_math_exact_tests builds pass; both CTest groups pass three times (6 passes). Conventions and local merge-tree checks pass. This is rebase qualification, not a new Windows/console comparison or exception-flag claim; earlier measurements keep their original head attribution.

Refresh patch, preservation hashes and build/test logs — SHA256 0110f192a55f17b8130543f4bc0cc44442d5933bdcd96fa0be8d66b655c30618; archive downloaded and hash-verified.

Earlier Windows report, retained from public head 53d65b3e37 before this refresh; Windows was not rerun for the rebased head:

Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, WinLibs GCC 15.2.0 UCRT r7, Ninja, Release, BUILD_TESTING=ON, main 606999f3ab.

  • Comparison: a scratch loader runs the decrypted libc.prx of eleven titles natively and supplies __error: PPSA04158, PPSA05916, PPSA07923, PPSA09614, PPSA13934, PPSA20423, PPSA25636, PPSA26528, PPSA33655, PPSA34008 and PPSA35169. It compared their four functions with this PR's code, checking result bits (NaN payloads included), the remquo quotient and errno, on 4,000,196 pairs per title:

    • every pair of 14 special values;
    • 4 million random pairs, half random bit patterns and half with the divisor's exponent up to 80 below the dividend's;
    • the float functions use the high 32 bits of each pair.

    All eleven give identical results, quotients and errno on all of them, with this PR built at -O3, and at -O0 for PPSA07923. EDOM is set on 36 of the double pairs and 21 of the float ones.

  • guest_math: the new CheckRemainderConsoleBits has 15 double and 15 float cases, each checked through both remainder and remquo, with the console's results, quotients and errno:

    • ordinary remainders of every sign combination;
    • the largest finite value over the value just above 1;
    • a huge dividend over a subnormal divisor;
    • subnormal operands;
    • an infinite divisor;
    • a zero divisor and an infinite dividend (EDOM);
    • NaN payloads in each position and in both;
    • a signalling NaN dividend.

    The quotient is not checked when the result is a NaN. There it is whatever fprem1 leaves in the condition codes, which Intel documents as undefined. This PR matches the console's code on the same host CPU in those cases, which the comparison above checks, but another CPU might differ. main's existing remainder and remquo checks still pass.

  • guest_math and guest_dinkumware_internals pass in three runs out of three on the exact head.

  • Negative control: with main's Math.cpp and these tests, guest_math aborts in a Require, while guest_dinkumware_internals still passes.

  • python tools/check_conventions.py --base origin/main and git diff --check pass.

  • Order: this PR adds a test and a debt entry at the same anchors as my other libc PRs, so it conflicts with them textually only and lands in any order.

  • Not tested: macOS build of the inline assembly, a physical console, the floating-point exception flags, and remainderl/remquol.

Current-main Linux refresh

Refreshed as 70b22d401552ac3c90dc85826e42bc8d9de7031b, one topic commit directly on main 1da5d1a757f18e04847557ce98953935f028a229, with no merge commits. All seven implementation functions and CheckRemainderConsoleBits are unchanged from previous public head 8e0051f69a7ab0041a5e3638b1f0f96d9bf52f04. Main's newer math implementations, test calls and canonical public declarations are retained. Both sides' debt entries are retained. This refresh adds no behavior change.

Fresh Linux x86-64 Release validation: guest_math, guest_math_exact, guest_dinkumware_internals and public_headers each pass three consecutive runs, then all four pass three more after the negative-control restoration. With only production Math.cpp replaced by main, guest_math aborts as expected while guest_math_exact and guest_dinkumware_internals pass. Restoring the candidate produces a byte-identical libc.prx. Conventions and whitespace checks pass. The historical Windows/title-library comparisons above were not rerun; no title, console, exception-flag or performance claim is added.

Exact-head Linux logs, negative control and preservation proof (SHA-256 fb2cfc42ceebfc84d0a12cd0abf00ac2fbdfd9a8db1bcb3fb99a5a2342455a1e).

Current Linux qualification (2026-10-28)

Rebased onto main 2227f1366188cda5699dd20e2e756a18006a5d4b. Linux CPU validation on 2026-10-28 at 71a6a726c99b18c241f9dbdca1a859ac852e1c61 (Arch Linux 7.2.9, AMD Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON).

libc, guest_math_tests and guest_math_exact_tests rebuilt from this exact source. guest_math and guest_math_exact each passed three consecutive runs (6/6, no skips); the same two suites each passed three runs on the pinned main (6/6). Conventions and whitespace checks pass.

Exact source pins, preservation proofs, dependency checks, build logs and JUnit, SHA-256 1176269c9e6948b5252a5db9e660978d7f978fb2d9f4ed6c68bc050b10b5ae68. This is focused Linux CPU qualification; earlier Windows/title/reference measurements retain their original pins. No new title or performance result is claimed.

Qualification update — 2026-10-30, repeat 2

Integrated pinned main e471817c68d4e1b1e44b0ce369ed88bafe4ae8ed at d473b63d051a1345aa8860868a5f18ea498835fc, retaining original topic commits as ancestors.

Actual Linux libc/focused binaries rebuilt from this final head; guest_math, guest_math_exact, guest_dinkumware_internals each pass three consecutive runs (9 runtime passes), plus public_headers. Conventions against current origin/main and whitespace pass. Pinned main passed all seven runtime groups plus the header audit three times (24 runs). Full source/function/test/debt/header and 31 recursive dependency / 17,742 tracked-blob proofs are attached. Later main 1c6b316cf762 has 17 off-topic commits, no relevant libc/numeric/qsort/gitlink changes, and all 9 merge previews are clean; those preview trees were not executed.

Focused Linux CPU scope only: prior Windows/SDK/reference reports keep original pins. No fresh Windows, console, SDK-module, title/GPU or speed measurement is claimed by this report. AI-assisted: yes. Evidence: https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/owned-math9-maine471-linux-20261030-repeat2.tar.gz (SHA256 5da4ce1732b45bb3fc566c31078c8c9ae8bf0c403654dfc60d15ee28490e20bf).

AI-assisted: yes (Codex).

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: none; the assembly's loop is rewritten as inline assembly
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4987711489 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10349). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-23T18:47:45Z. --- ### What `remainder`, `remainderf`, `remquo` and `remquof` returned the host's functions. The `libc.prx` that titles ship does not use msun's C versions for these. It uses FreeBSD's amd64 assembly, [`e_remainder.S`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/lib/msun/amd64/e_remainder.S), [`e_remainderf.S`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/lib/msun/amd64/e_remainderf.S), [`s_remquo.S`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/lib/msun/amd64/s_remquo.S) and [`s_remquof.S`](https://github.com/freebsd/freebsd-src/blob/release/11.4.0/lib/msun/amd64/s_remquof.S): an x87 `fprem1` loop. That differs from the host's results in three places: - **`remquo`'s quotient:** the assembly stores the sign and the three low bits of the quotient, from C0, C3 and C1. For example, `remquo(1e300, 1e-300)` gives a quotient of 2 there and 8,054,146 on Windows (UCRT). Both are allowed by C, but titles see 2. - **NaN results:** the x87 unit picks between two NaN operands by significand, and a zero divisor or an infinite dividend gives the x87 default NaN `0xfff8000000000000`. For example, `remquo(1, 0)` and `remquof(1, 0)` are negative NaNs there and positive ones on Windows. - **`errno`:** Sony's wrapper sets `EDOM` for a zero divisor or an infinite dividend when neither argument is a NaN, and leaves it alone otherwise. Against 4,000,196 sampled pairs, `main` differs from the titles' copies on 1,548 `remainder` pairs, 2,910,271 `remquo` pairs and 2,388,665 `remquof` pairs. It matches on `remainderf`. All four now run the same `fprem1` loop in one helper. GCC's documented `"=t"`/`"u"` constraints are used for it, as in its `fprem` example. `remquo` and `remquof` take the quotient bits from the status word as the assembly does, and all four set `EDOM` by that rule. ### Tested **Current-main integration (2026-11-02):** `904fbdca7e9fa6f54f2f70af6724304d9ad7113f` includes main `a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8` and retains the existing public commits. Conflicts preserve main’s math implementations, regression checks and debt entries alongside this topic. Linux x86-64 Release, GCC 16.2.1: rebuilt libc and the three math executables; `guest_math`, `guest_math_exact` and `guest_dinkumware_internals` each pass three times (9 passes, zero skips), and `public_headers` passes. The same baseline groups pass on main; conventions and whitespace pass. Source and dependency blobs, executable/library hashes, raw logs and JUnit are retained. This refresh adds no new console, Windows, title, GPU or numerical-reference measurement. [Qualification evidence](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/math-root14-maina4eca-linux-20261102-terminal.tar.gz), SHA-256 `22866bd2a060ba69cd4387d471605afe20ed644e3257174b2d1488635f8c9b52` (download verified). **Current-main conflict qualification (task 2026-11-01; execution UTC recorded in logs).** Published exact head `3ae4cd1429f670352b038174a45719759bf0ead1` is linear above pinned main `93dbd0f82aea684e95f15f06e7d42c0064af18cf`. One topic commit on current main, with original JJenkx authorship preserved. All measured remainder/remquo helper bodies and the existing remainder regression are unchanged. The test conflict preserves main’s complete tanhf/expm1f fixtures and adds the exact existing remainder fixture once; all current-main debt remains. Actual Linux libc and selected test executables rebuilt from the final public input tree. `guest_math`, `guest_math_exact`, `guest_dinkumware_internals` each passed three consecutive runs: **9 runtime passes, zero skips**, plus public_headers. Conventions against pinned origin/main and whitespace pass. The same pinned main passes all ten selected numeric/formatting/stream/CRT/string groups three times (30 passes), plus public_headers. Source and public-header blobs, preserved fixtures, commit authorship, source cleanliness, explicit old-SHA push leases and postpush head checks are attached. 33 recursive dependency trees / 18,032 tracked blobs verify before/after with zero errors; QuickJS’s update=none test262 corpus is explicitly excluded and is not a libc build input. Environment: Linux-7.2.11-arch1-1-x86_64-with-glibc2.44, Ryzen 9 7950X, GCC16.2.1, Ninja Release, BUILD_TESTING=ON. This is focused Linux CPU qualification; earlier Windows/module/reference reports keep their original pins. No fresh Windows/macOS, SDK-module, console, title/GPU or performance execution is claimed. AI-assisted: yes (Codex). Evidence: https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/math-three-main93db-linux-20261101.tar.gz; SHA-256 e2f9eeee734f73fd6a3a7e944c742e860c04d937accff9b4bb532229fb38df6a. Earlier dated qualification and reference reports below remain historical at their recorded source pins. <!-- codex-main-refresh-20261027-pr10349 --> **Current-main conflict refresh, 2026-10-27 UTC:** exact head `436622ee3c3de1779d6a513b015d5f78687209b5` on tested main `74acfad65b3f0fd4eab653f3a3989d298fba1157`. Resolved overlapping test/debt context while preserving this branch's authored production/test edits and main's nextafter environment implementation and coverage. Existing prerequisite commits remain in their original series order. Linux focused rebuild of `libc` and selected test executables passes `guest_math` and `guest_math_exact`, each three times: **6 passes, zero skips**. Conventions and whitespace checks pass. Final fetched main `cb45ae2ddf6e113a4619e8fed91fe7b9333c5c0f` merges cleanly; its later change is an unrelated Windows crash-test pattern, and the executed qualification remains pinned to the stated base. No new Windows, console, GPU, title, full-suite or negative-control run is claimed. Earlier reference/Windows evidence keeps its original pins. [Exact pins, branch patches, preservation proofs, build/test logs, JUnit and lease-push receipts for this refresh batch](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/owned-math14-main74acfad-linux-refresh-20261027.tar.gz). SHA-256: `e33f98cc467f038af662cc5fa491c3acc1806bb47171cf77b748f0d4d052c1f2`; downloaded copy verified. Refreshed onto main `8a29e0883470b827f7eb7081196d0518c2aef0ec` as `63b201aac1dec7669e71792184ee890ec962412f`, one topic commit with no merge commits. The only conflict was an additive debt-file append: main's child-process registry entry and this PR's remainder/remquo entry are both retained. All seven production/helper function bodies and `CheckRemainderConsoleBits` are byte-identical to previous public head `70b22d401552ac3c90dc85826e42bc8d9de7031b`. Fresh Linux `libc`, `guest_math_tests` and `guest_math_exact_tests` builds pass; both CTest groups pass three times (6 passes). Conventions and local merge-tree checks pass. This is rebase qualification, not a new Windows/console comparison or exception-flag claim; earlier measurements keep their original head attribution. [Refresh patch, preservation hashes and build/test logs](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr10349-head63b201aa-main8a29-linux-refresh.tar.gz) — SHA256 `0110f192a55f17b8130543f4bc0cc44442d5933bdcd96fa0be8d66b655c30618`; archive downloaded and hash-verified. Earlier Windows report, retained from public head `53d65b3e37` before this refresh; Windows was not rerun for the rebased head: Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, WinLibs GCC 15.2.0 UCRT r7, Ninja, Release, `BUILD_TESTING=ON`, `main` 606999f3ab. - **Comparison:** a scratch loader runs the decrypted `libc.prx` of eleven titles natively and supplies `__error`: PPSA04158, PPSA05916, PPSA07923, PPSA09614, PPSA13934, PPSA20423, PPSA25636, PPSA26528, PPSA33655, PPSA34008 and PPSA35169. It compared their four functions with this PR's code, checking result bits (NaN payloads included), the `remquo` quotient and `errno`, on 4,000,196 pairs per title: - every pair of 14 special values; - 4 million random pairs, half random bit patterns and half with the divisor's exponent up to 80 below the dividend's; - the float functions use the high 32 bits of each pair. All eleven give identical results, quotients and `errno` on all of them, with this PR built at `-O3`, and at `-O0` for PPSA07923. `EDOM` is set on 36 of the double pairs and 21 of the float ones. - **`guest_math`:** the new `CheckRemainderConsoleBits` has 15 double and 15 float cases, each checked through both `remainder` and `remquo`, with the console's results, quotients and `errno`: - ordinary remainders of every sign combination; - the largest finite value over the value just above 1; - a huge dividend over a subnormal divisor; - subnormal operands; - an infinite divisor; - a zero divisor and an infinite dividend (`EDOM`); - NaN payloads in each position and in both; - a signalling NaN dividend. The quotient is not checked when the result is a NaN. There it is whatever `fprem1` leaves in the condition codes, which Intel documents as undefined. This PR matches the console's code on the same host CPU in those cases, which the comparison above checks, but another CPU might differ. `main`'s existing `remainder` and `remquo` checks still pass. - `guest_math` and `guest_dinkumware_internals` pass in three runs out of three on the exact head. - **Negative control:** with `main`'s `Math.cpp` and these tests, `guest_math` aborts in a `Require`, while `guest_dinkumware_internals` still passes. - `python tools/check_conventions.py --base origin/main` and `git diff --check` pass. - **Order:** this PR adds a test and a debt entry at the same anchors as my other libc PRs, so it conflicts with them textually only and lands in any order. - **Not tested:** macOS build of the inline assembly, a physical console, the floating-point exception flags, and `remainderl`/`remquol`. ### Current-main Linux refresh Refreshed as `70b22d401552ac3c90dc85826e42bc8d9de7031b`, one topic commit directly on main `1da5d1a757f18e04847557ce98953935f028a229`, with no merge commits. All seven implementation functions and `CheckRemainderConsoleBits` are unchanged from previous public head `8e0051f69a7ab0041a5e3638b1f0f96d9bf52f04`. Main's newer math implementations, test calls and canonical public declarations are retained. Both sides' debt entries are retained. This refresh adds no behavior change. Fresh Linux x86-64 Release validation: `guest_math`, `guest_math_exact`, `guest_dinkumware_internals` and `public_headers` each pass three consecutive runs, then all four pass three more after the negative-control restoration. With only production `Math.cpp` replaced by main, `guest_math` aborts as expected while `guest_math_exact` and `guest_dinkumware_internals` pass. Restoring the candidate produces a byte-identical `libc.prx`. Conventions and whitespace checks pass. The historical Windows/title-library comparisons above were not rerun; no title, console, exception-flag or performance claim is added. [Exact-head Linux logs, negative control and preservation proof](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr10349-head70b22d40-main1da5-linux-validation.tar.gz) (SHA-256 `fb2cfc42ceebfc84d0a12cd0abf00ac2fbdfd9a8db1bcb3fb99a5a2342455a1e`). <!-- codex-math-refresh-20261028-repeat-pr10349 --> ### Current Linux qualification (2026-10-28) Rebased onto `main` `2227f1366188cda5699dd20e2e756a18006a5d4b`. Linux CPU validation on 2026-10-28 at `71a6a726c99b18c241f9dbdca1a859ac852e1c61` (Arch Linux 7.2.9, AMD Ryzen 9 7950X, GCC 16.2.1, Ninja Release, BUILD_TESTING=ON). `libc`, `guest_math_tests` and `guest_math_exact_tests` rebuilt from this exact source. `guest_math` and `guest_math_exact` each passed three consecutive runs (6/6, no skips); the same two suites each passed three runs on the pinned main (6/6). Conventions and whitespace checks pass. [Exact source pins, preservation proofs, dependency checks, build logs and JUnit](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/owned-math25-main2227-linux-20261028-repeat.tar.gz), SHA-256 `1176269c9e6948b5252a5db9e660978d7f978fb2d9f4ed6c68bc050b10b5ae68`. This is focused Linux CPU qualification; earlier Windows/title/reference measurements retain their original pins. No new title or performance result is claimed. <!-- codex-maintenance-20261030-repeat2-10349 --> **Qualification update — 2026-10-30, repeat 2** Integrated pinned main `e471817c68d4e1b1e44b0ce369ed88bafe4ae8ed` at `d473b63d051a1345aa8860868a5f18ea498835fc`, retaining original topic commits as ancestors. Actual Linux libc/focused binaries rebuilt from this final head; `guest_math`, `guest_math_exact`, `guest_dinkumware_internals` each pass three consecutive runs (9 runtime passes), plus public_headers. Conventions against current origin/main and whitespace pass. Pinned main passed all seven runtime groups plus the header audit three times (24 runs). Full source/function/test/debt/header and 31 recursive dependency / 17,742 tracked-blob proofs are attached. Later main `1c6b316cf762` has 17 off-topic commits, no relevant libc/numeric/qsort/gitlink changes, and all 9 merge previews are clean; those preview trees were not executed. Focused Linux CPU scope only: prior Windows/SDK/reference reports keep original pins. No fresh Windows, console, SDK-module, title/GPU or speed measurement is claimed by this report. AI-assisted: yes. Evidence: https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/owned-math9-maine471-linux-20261030-repeat2.tar.gz (SHA256 5da4ce1732b45bb3fc566c31078c8c9ae8bf0c403654dfc60d15ee28490e20bf). AI-assisted: yes (Codex). ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source: none; the assembly's loop is rewritten as inline assembly - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes AI-assisted (Claude Code).
MarcZX10 commented 2026-10-23 18:56:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T18:56:07Z.

Review: APPROVED


Reviewed the shared fprem1 helper, quotient extraction, domain-error condition, and the added bit-pattern regressions. The x87 status-word extraction follows the cited FreeBSD amd64 implementation, and the errno condition excludes NaN operands as described. The tests cover signed quotient cases, subnormals, infinities, NaN payload preservation, and both precisions; the PR also reports matching results against eleven title libc.prx copies over 4,000,196 input pairs each.

The focused local test cannot run on this host: it lacks the CPU features required by the project’s test guard. I confirmed this host limitation independently; I am relying on the reported Windows test runs and the passing hosted conventions/relinker checks, not claiming a local runtime pass. The hosted full Linux and Windows product jobs are skipped under the repository’s PR workflow policy. I found no blocking issue in the inspected diff.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5633113867 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10349#pullrequestreview-5633113867). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T18:56:07Z. **Review:** APPROVED --- Reviewed the shared `fprem1` helper, quotient extraction, domain-error condition, and the added bit-pattern regressions. The x87 status-word extraction follows the cited FreeBSD amd64 implementation, and the `errno` condition excludes NaN operands as described. The tests cover signed quotient cases, subnormals, infinities, NaN payload preservation, and both precisions; the PR also reports matching results against eleven title `libc.prx` copies over 4,000,196 input pairs each. The focused local test cannot run on this host: it lacks the CPU features required by the project’s test guard. I confirmed this host limitation independently; I am relying on the reported Windows test runs and the passing hosted conventions/relinker checks, not claiming a local runtime pass. The hosted full Linux and Windows product jobs are skipped under the repository’s PR workflow policy. I found no blocking issue in the inspected diff.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10349
No description provided.