18 Commits
Author SHA1 Message Date
Dean 82ae582706 Merge pull request #10626 from maximilianfv/fix/tests-floating-point-enabled-query-rosetta
fix(tests): compare the enabled exception query with the environment the host keeps
2026-10-27 10:30:46 +13:00
Dean 265c36523c Merge pull request #10175 from orezraey/fix/libc-fetestexcept-measured-ps5
fix(libc): return fetestexcept's unmasked status bits as measured on a PS5
2026-10-27 08:57:53 +13:00
Adrià FranchandClaude Sonnet 5.5 725eb5fd30 fix(main): compare only the x87 control and status words and MXCSR across thread switches
Run 40226437381 failed guest_floating_point (feholdexcept workers preserve the main environment). The test compared the whole fnstenv image (tag word, FIP/FDP) of the main thread before and after other threads ran; a context switch re-initialises that state when the x87 unit is idle, so it flakes (3 of 28 main builds). Compare control word, status word and MXCSR.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 22:16:55 +01:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
Maximilian FleckensteinandClaude Opus 5.5 7ce21df27a fix(tests): compare the enabled exception query with the environment the host keeps
CheckEnabledExceptions writes x87 and MXCSR states with some SSE
exceptions unmasked, calls fegetexcept, and expects the environment
afterwards to equal the state it wrote. Under Rosetta 2 MXCSR keeps its
six exception masks set, as CheckTraps already allows for, so whenever
the test unmasks an SSE exception the state read back differs from the
one written, and the check failed although fegetexcept changed nothing.
Compare with the environment read back right after the write instead;
on other hosts the two are the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 06:14:51 -03:00
Dean Galvin 7c52c8728a Merge main into feat/libc-feholdexcept 2026-10-24 21:43:00 +13:00
Dean 09f62b94c9 Merge pull request #9216 from Felipebmaitan/feat/libc-fegetexcept
feat(libc): implement fegetexcept
2026-10-24 18:23:35 +13:00
orezraeyandClaude Opus 5.5 d8d7c5aacd Merge main into fix/libc-fetestexcept-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 11:39:38 -03:00
orezraeyandClaude Opus 5.5 815a9e0289 fix(libc): return fetestexcept's unmasked status bits as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 08:41:38 -03:00
mugurc 100148f762 fix(tests): expect the SSE traps the host keeps in the floating-point trap checks
The trap checks unmask exceptions with feenableexcept and its relatives
and expect MXCSR to hold the new masks, and the enable and disable
results to report the traps enabled on both units. Under Rosetta 2
MXCSR keeps its six exception masks set, so no SSE trap is ever enabled
and every result reports none. The test now asks the host once whether
it keeps an unmasked MXCSR exception and, where it does not, expects
all six SSE masks set and no trap on both units; on other hosts the
expectations are the same as before. A debt entry records that the
trap functions change only the x87 masks under Rosetta.
2026-10-22 13:00:10 +03:00
mugurc 65ba3a665f fix(tests): compare the floating-point exception masks with the ones the host keeps
Under Rosetta 2 the six MXCSR exception masks always read back set: a
write that unmasks an SSE exception is not kept, while the x87 masks and
the other MXCSR bits are. guest_floating_point unmasked the overflow
exception on both units and then expected MXCSR to equal the value it
wrote, so it failed on macOS although fesetexceptflag and feclearexcept
left the masks alone. The test now compares with the environment read
back after the write, which on other hosts is the value written. The
debt entry for the floating-point functions notes the Rosetta behaviour.
2026-10-22 13:00:10 +03:00
Felipebmaitan 18213e0f3a feat(libc): implement fegetexcept 2026-10-21 12:24:14 -03:00
Kraken 8e1f4f802e feat(libc): implement feholdexcept 2026-10-21 04:36:33 +01:00
Dean 559f35d685 Merge pull request #8442 from hypermoist/feat/libc-fenv-traps
feat(libc): add the floating-point trap controls
2026-10-21 12:25:36 +13:00
hypermistandClaude Opus 5.5 13a3897f96 test(libc): pin the MXCSR trap masks and the both-units trap result
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 11:49:12 +13:00
priyanshrv-netizenandClaude Opus 5.5 e1018840e3 feat(libc): implement _Feraise
Raise the requested floating-point exceptions on the x87 and SSE units
and set errno as the console's libc.prx does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 22:38:30 +05:30
hypermistandClaude Opus 5.5 bf6f9cc3e2 feat(libc): add the floating-point trap controls
feenableexcept, fedisableexcept, their __ forms, fegettrapenable and
fesettrapenable unmask or mask exceptions in the x87 control word and
MXCSR, with the console's return values.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 01:41:54 +13:00
lorkydey 4e7e8ac1a9 feat(libc): implement floating-point rounding and exception flags 2026-10-17 03:46:56 +02:00