Repository navigation
feat(libc): implement feholdexcept - #8863
Conversation
|
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.
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed the x87/MXCSR save and mask sequence and the test matrix. fnstenv captures the x87 environment before its masking side effect, the explicit fnclex clears x87 pending exceptions, and the saved MXCSR is restored into the output before the new masked/cleared MXCSR is installed. The tests exercise bounds, null handling, errno, flags, controls and thread isolation. The implementation appropriately records that console equivalence is not measured. I found no blocking issue in the diff.
|
Independent Windows run of this PR (data only). Environment: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. Merge-tree of the PR head against Results (3 runs each):
Not run: other platforms, the other tests in the same family, the full repository CTest, and any title or console run. AI-assisted (Claude Code). |
|
Recorded the independent Windows result and its limits: |
|
@UnhealthyKraken the new |
|
The reported assertion is addressed by the already-merged #11191, which is included in the main snapshot I built only the focused floating-point target and its dependencies on a hosted Linux AMD EPYC 7763 runner, with matching libraries and parallelism 1. The remaining full-save comparisons around individual calls are already being addressed in #10937. I have not submitted a competing fix or treated these 300 repetitions as proof that every floating-point intermittency is gone. AI-assisted investigation and validation; no local builds were run. |
What
Provide
feholdexcept(1kduKXMqx7k, libSceLibcInternal implemented by shared libc). It saves the current thread's 32-byte x87/MXCSR environment, clears pending exceptions and masks traps in both units while retaining other controls. Null output throws before any state changes.The public SDK declaration and amd64 layout, public 3.20 symbol table and independently matching NID database establish interface evidence. Behavior follows FreeBSD 11 amd64 fenv.c, alongside the existing fegetenv implementation. Console equivalence and module/library versions remain unverified and are recorded in libc debt. No proprietary module or capture is included.
Tested
Windows x86-64, GCC 15.2, Release. No games or GPU execution.
05f9995704ce700749880024243469924ad1db9afails on the missing export. Exactly the same test binaries, swapping only saved baseline/candidate libc, yield baseline one expected failure plus two passing math suites; candidate three passing suites.4f24b6a64c4d62ce01da251820d159a25d6b23fb. The libc sources/test/debt did not change from the original tested base; subsequent main changes were AGC, VideoOut and SystemService work.Independent Windows validation by xXPBSXx, Windows10 Pro/Ryzen7 5800X3D/WinLibs GCC15.2 Release: the existing guest_floating_point case passes three runs on this PR, and the identical test fails three runs after replacing only Math.cpp with merge-base4f24b6a64c. Only that test target was built. This is attributed reviewer evidence, not an own rerun or a full-suite/other-platform/console result.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)