test(libc): read only the standard exception flags in the tiny asin and atan check #24311
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24311"
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 Jazeupoi on 2026-11-20T13:51:15Z.
What
guest_mathfails on macOS since #23972 addedCheckTinyInverseTrigFlags:The check compares
std::fetestexcept(FE_ALL_EXCEPT)withFE_INEXACT. On x86_64 macOS,FE_ALL_EXCEPTis0x3fand includesFE_DENORMALOPERAND(0x02). An SSE operation on a subnormal input sets that flag, so for±denorm_minthe test reads0x22where it expects0x20. With temporary logging, the four failing cases areasinandatanof0x1p-1074and-0x1p-1074: the result bits anderrnoare as expected, the flags are0x22. glibc'sFE_ALL_EXCEPThas no such flag, so Linux passes.The file already defines
StandardExceptions, the five C exception flags, for this. The check now uses it, as #20503 did for two other tests. The library is unchanged, and the check still requires exactlyFE_INEXACTfor nonzero inputs and no flag for zeros.Tested
Apple M4, macOS 27.0.1, Apple clang (Command Line Tools), x86_64 Release build under Rosetta 2.
main0a025bd3c6with #17425 and #11049, which the macOS build needs.guest_mathmainGuestMath.cpp:4794Not run on Linux or Windows. The change only drops non-standard flags from the comparison, so a platform whose
FE_ALL_EXCEPTis the five standard flags reads the same value as before.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)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T13:56:08Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
dc3734b0c5:tools/check_conventions.pypassed.guest_math_testsbuilt cleanly.guest_math):Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T10:12:25Z.
Review: APPROVED
Reviewed — looks good
The change limits the tiny inverse-trig test to the five standard floating-point exception flags, matching its stated cross-platform intent; I found no blocking defect.
What I ran
Reviewed head
dc3734b0c5f55b8a0ebad2a9d5fa59d7e096d7db. I read the prepared description, commit list, manifest, diff, and the changed source at the relevant ranges usingrepo_read.py. I did not run tests or a build.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports macOS results; I did not independently run them. Linux and Windows behavior was not tested. The only changed file,
core/libs/tests/GuestMath.cpp, was read at the changed function and the existing mask definition and usage sites. No files were excluded from review according to the manifest.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T11:11:43Z.
Review: COMMENTED
Ran the submitted tiny inverse-trigonometric fixture by itself on Linux with the pinned project libraries. It passed its result-bit,
errnoand standard floating-point flag checks on the tinyasinandatancases. In the broader mixed-library fixture, execution stopped earlier at anexpm1lcase, so the result here is for the changed check.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.