fix(tests): compare the floating-point exception masks with the ones the host keeps #8287
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8287"
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 mugurc on 2026-10-20T08:48:21Z.
What
guest_floating_point(#6985) fails on macOS with "flag updates preserve exception masks". The check unmasks the overflow exception in the x87 control word and in MXCSR, callsfesetexceptflagandfeclearexcept, and expects both to equal the values it wrote. Under Rosetta 2 the six MXCSR exception masks always read back set, so MXCSR never held the value the test wrote, although the two functions left the masks alone. Part of the macOS series announced on #1 (https://github.com/boykopovar/AnyPS5/issues/1#issuecomment-6124344298).The trap checks that #8442 added since fail on macOS for the same reason, the first one with "enable unmasks the SSE exceptions". They unmask exceptions with
feenableexceptand its relatives, expect MXCSR to hold the new masks, and expect the enable and disable results to report the traps enabled on both units. Under Rosetta no SSE trap is ever enabled, so MXCSR keeps all six masks and every result reports none. A second commit:Tested
macOS 26.5.1, Apple M5 Max, Apple clang 21, x86-64 build under Rosetta 2. The libraries do not link on macOS without the rest of the macOS series. The first commit ran on
main3fd1cc393with the series (ci/macos-series-2on my fork), #8279, #8284, the open macOS fixes #7524 and #7937, and three changes from #7332; the second onmain7e2ba73e4with the series, which now includes #7937, and the libSceSsl change of #7332. Both commits are now onmaincc0078595.0x1f80reads back0x1f80. Flush-to-zero with denormals-are-zero (0x9fc0) and rounding mode 3 (0x7f80) read back as written, and so does an x87 control word with the overflow mask cleared (0x0377).guest_floating_pointfails without this PR and passes with it, 5 runs of 5, before and after #8442's trap checks (with the second commit for those).guest_floating_pointpasses.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 ycbuzi on 2026-10-21T06:58:38Z.
Windows run of 9415d8f574 merged onto
mainec7eacc62d(6dcb085765, clean), one of the hosts the description lists as not run. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release,BUILD_TESTING=ON.Built
guest_floating_point_testswith no errors or warnings;ctest --repeat until-fail:2onguest_floating_point: passes on both repeats. Not run: Linux.