Commit Graph
1900 Commits
Author SHA1 Message Date
Dean 1f52200308 Merge pull request #11333 from Danigamer05/feat/libc-signed-max32
feat(libc): implement signed 32-bit maximum value helper
2026-10-29 07:27:25 +13:00
Dean 45f40b505d Merge pull request #12291 from B-Howell/claude/fix-issue-9691-hex-strtod-erange
fix(libc): match title libc.prx for hexadecimal strtod underflow
2026-10-29 07:26:33 +13:00
Adrià 7fea87746b Merge pull request #11737 from xXPBSXx/libm/asinh-msun
fix(libc): compute asinh with FreeBSD msun's algorithm
2026-10-28 17:58:59 +01:00
Adrià b9eafb0c49 Merge pull request #11808 from jotitadev/fix/macos-future-category-dwarf-unwind
fix(tests): keep DWARF unwind tables in the future_error test on macOS
2026-10-28 17:36:09 +01:00
Adrià 6eae433fad Merge pull request #11801 from jotitadev/fix/macos-waitpid-child-signals
fix(libkernel): report a child's stop and kill signals correctly on macOS hosts
2026-10-28 17:35:55 +01:00
Adrià 8c621aa276 Merge pull request #11729 from iAbdulrrahman/feat/libc-fetch-64-bit-atomics
feat(libc): implement 64-bit atomic fetch helpers
2026-10-28 17:35:48 +01:00
Dean 3070a25d9e Merge pull request #12319 from JJenkx/windows/libc-acosf-edom
fix(libc): store EDOM and raise FE_INVALID from acosf and asinf domain errors
2026-10-29 03:34:51 +13:00
Adrià aa77c9a1d3 Merge pull request #11283 from AlexFigas/fix/libc-ldtest-unnormals
fix(libc): classify x87 unnormals as denormal in _LDtest and _LDclass
2026-10-28 14:48:57 +01:00
Dean 14a269cfef Merge pull request #12187 from Danigamer05/feat/libc-stdc-count-zeros
feat(libc): add C23 count-zeros exports
2026-10-28 22:50:41 +13:00
Dean f653b562a9 Merge pull request #12037 from JJenkx/windows/libc-fexp-titles
fix(libc): compute _Exp and _FExp as titles do
2026-10-28 22:40:19 +13:00
Dean 6e30e673cd Merge pull request #11983 from JJenkx/windows/libc-xfrm-truncation
fix(libc): copy count units of a strxfrm or wcsxfrm result that does not fit, as titles' libc.prx does
2026-10-28 22:36:52 +13:00
JJenkxandClaude Opus 5.5 8b5c02ca61 fix(libc): store EDOM and raise FE_INVALID from acosf and asinf domain errors
For |x| > 1, the infinities and NaN, titles' libc.prx stores EDOM and
raises FE_INVALID from acosf, quiet NaN included, and asinf also
raises FE_INVALID for a quiet NaN. acosf returned the same NaN bits
without either, and asinf set errno but raised nothing for a quiet NaN.
Both now call _Feraise with the invalid exception, which stores EDOM
and raises the flag in both units; the results are unchanged.

The acosf test asserted the old errno-preserving behaviour from a
FreeBSD reading; it now checks the titles' EDOM and FE_INVALID.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 05:17:22 -04:00
B-HowellandClaude Opus 5.5 82c8a51391 fix(libc): saturate the hexadecimal strtod exponent past any digit run
The explicit binary exponent stopped accumulating near 1e9 while the
digits add 4 per character without bound, so a subject with a few
hundred million digits was classified against the wrong exponent:
0x1 followed by 3e8 zeros and p-1200000005000 kept errno, and a long
zero fraction with p+1000000000000 underflowed instead of overflowing.
Saturate the explicit exponent at 2^62, beyond what any addressable
digit run can offset, so the sum never overflows or changes sign.

Record that _Stod and _Stodx follow the title libc.prx rule for
hexadecimal underflow, unverified for libSceLibcInternal.

Refs #9691

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 03:49:24 -04:00
B-HowellandClaude Opus 5.5 6084ed65b4 fix(libc): match title libc.prx for hexadecimal strtod underflow
Classify hexadecimal strtod and wcstod input from its own digits rather
than a long double approximation. As measured on God of War Ragnarok's
bundled libc.prx, ERANGE is set only on overflow or when the exact value
is below 2^-1074, and a value between 2^-1075 and 2^-1074 becomes the
smallest subnormal only from 2^-1075 * (1 + 2^-52) up.

Refs #9691

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 03:49:24 -04:00
Dean da6b0ea8dd Merge pull request #11884 from JJenkx/windows/libc-strtof-nan-payload
fix(libc): keep NaN payloads in strtof and wcstof as titles' libc.prx does
2026-10-28 20:11:27 +13:00
Adrià 0cd07dc4ab Merge pull request #11399 from iAbdulrrahman/feat/libc-digittoint-and-numbers
feat(libc): implement digittoint, isnumber, and ishexnumber
2026-10-28 06:34:59 +01:00
Adrià 895ead67f7 Merge pull request #11396 from iAbdulrrahman/feat/libc-timingsafe-memcmp
feat(libc): implement timingsafe_memcmp
2026-10-28 06:25:30 +01:00
Dean 5ab8acf45f Merge pull request #11309 from Danigamer05/feat/libc-signed-min32
feat(libc): implement signed 32-bit minimum value helper
2026-10-28 17:50:21 +13:00
Dean c9cc3b34db Merge pull request #11304 from Danigamer05/feat/libc-unsigned-max32
feat(libc): implement unsigned 32-bit maximum
2026-10-28 17:50:05 +13:00
Dean 24795c0f56 Merge pull request #10529 from JJenkx/fix/libc-expm1-scaling-association
fix(libc): preserve expm1 rounding during exponent scaling
2026-10-28 17:49:49 +13:00
Dean 897fff64c4 Merge pull request #9240 from milescoviello/fix/backtrace-from-caller
fix(libc): start sceLibcBacktraceSelf's frames at its caller
2026-10-28 17:49:31 +13:00
Dean dbbe99aeb0 Merge pull request #9772 from UnhealthyKraken/feat/libc-floating-prefix
feat(libc): implement floating-point prefix helpers
2026-10-28 17:49:14 +13:00
Adrià 0c5401dcbd Merge pull request #9735 from mazen320/feat/libc-ctype-vtable
feat(libc): export the ctype facet vtable as data
2026-10-28 05:36:29 +01:00
Adrià 439d03db38 Merge pull request #11663 from Danigamer05/feat/libc-stdc-count-ones
feat(libc): add C23 count-ones exports
2026-10-28 04:19:47 +01:00
Adrià f1f1737371 Merge pull request #11647 from B-Howell/codex/libc-strtoq
feat(libc): implement strtoq
2026-10-28 04:06:20 +01:00
Danigamer05 e5835d6866 feat(libc): add C23 count-zeros exports 2026-10-28 03:09:35 +01:00
Dean 82e2d0ed14 Merge pull request #11335 from xXPBSXx/fix/filestream-flags-race
fix(libc): read the stream status flags atomically when keeping a directory read error
2026-10-28 13:51:15 +13:00
Dean 4c6fcfcb5c Merge pull request #9763 from rooklz/fix/libc-freopen-closed-stream
fix(libc): reopen a closed stream in freopen instead of aborting
2026-10-28 13:48:50 +13:00
xXPBSXxandClaude Sonnet 5.5 893250cf72 Merge main (951399570d) into libm/asinh-msun
The only conflict was in GuestMath.cpp, where main's sinh tests and this
branch's asinh tests were inserted at the same place. Keep both: the asinh
checks follow the sinh ones.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-28 01:31:59 +01:00
Dean 057de19313 Merge pull request #11556 from xXPBSXx/libm/sinh-msun
fix(libc): compute sinh with FreeBSD msun's algorithm
2026-10-28 13:03:47 +13:00
Dean 9f605c98d2 Merge pull request #10283 from JJenkx/windows/libc-cbrt-msun
fix(libc): compute cbrt with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-28 13:01:01 +13:00
Dean 46b9aa3768 Merge pull request #9648 from JJenkx/windows/libc-rand-console
fix(libc): follow the console's rand, srand and rand_r
2026-10-28 13:00:35 +13:00
Dean 6e9b9134f6 Merge pull request #11846 from heditrigui/feat/libc-reallocarray
feat(libc): implement reallocarray
2026-10-28 12:10:58 +13:00
Adrià e274546099 Merge pull request #11302 from Danigamer05/feat/libc-signed-max64
feat(libc): implement signed 64-bit maximum
2026-10-27 22:26:29 +01:00
Adrià 6d99bf4ccb Merge pull request #11300 from Danigamer05/feat/libc-signed-min64
feat(libc): implement signed 64-bit minimum
2026-10-27 22:16:40 +01:00
Adrià 4a6005955f Merge pull request #10898 from imellag/feat/libkernel-memory-protection-macos
feat(libkernel): guest memory protection and VirtualQuery on macOS hosts
2026-10-27 21:42:24 +01:00
Adrià 80b209d984 Merge pull request #11295 from Danigamer05/feat/libc-unsigned-min32
feat(libc): implement unsigned 32-bit minimum
2026-10-27 21:20:30 +01:00
Dean ab6a87a163 Merge pull request #10460 from Danigamer05/feat/libc-unsigned-max64
feat(libc): implement unsigned 64-bit maximum
2026-10-28 06:53:22 +13:00
JJenkxandClaude Opus 5.5 79d65956a1 fix(libc): compute _Exp and _FExp as titles do
The libc.prx that titles ship evaluates the rational step as
((Q(z) + g*P(z)) + 1) / ((Q(z) - g*P(z)) + 1), with its own ln 2 split
and coefficients in the double case, and returns 1 only for arguments
within half an epsilon of zero. main used a different rational form
with a doubling step and an epsilon-wide shortcut, which left about one
result in five one ulp away from titles.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 13:18:32 -04:00
Dean c6ebca22d3 Merge pull request #11796 from jotitadev/fix/libc-contraction-probe-osx-arch
test(libc): compile the contraction probe for the macOS build architecture
2026-10-28 06:03:15 +13:00
Adrià a1053d987b Merge pull request #11273 from Gruzzberry/fix/signal-pointer-faults
fix(libkernel): fail the signal action, mask, stack and pending calls with EFAULT on an unusable pointer
2026-10-27 17:55:35 +01:00
Danigamer05 f139bcf1fc feat(libc): implement signed 32-bit maximum value helper 2026-10-27 15:46:15 +01:00
JJenkxandClaude Opus 5.5 7c7cc70f2e fix(libc): copy count units of a strxfrm or wcsxfrm result that does not fit, as titles' libc.prx does
When the transformed string does not fit, strxfrm and wcsxfrm wrote
count - 1 characters and a terminator. The libc.prx bundled with titles
copies the first count characters and writes no terminator, as a plain
copy of count units would, and copies the terminator only when the whole
result fits. Both functions now do the same; the return value, the
length of the source, is unchanged. The tests that expected the
terminated prefix expect the measured units instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 10:28:10 -04:00
Alexandre Figueiredo 8130d344ea fix(libc): classify x87 unnormals as denormal in _LDtest and _LDclass 2026-10-27 13:26:57 +00:00
JJenkxandClaude Opus 5.5 bece5871e2 fix(libc): keep NaN payloads in strtof and wcstof as titles' libc.prx does
strtof and wcstof returned the default quiet NaN for any NAN(...)
sequence. The libc.prx bundled with eleven titles reads the payload as
its strtod does, but into one 32-bit word: a blank after the first group
of digits ends it, the first 8 digits are kept and cut to 24 bits, the
result goes under the quiet bit with the sign, and a zero payload
becomes 1. HexNanPayload now takes the word count, two for double and
one for float, and the NaN table test checks the measured float bits
and end for all 64 inputs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 07:13:19 -04:00
Maz d4a25e115a feat(libc): export the ctype facet vtable as data
Titles that import ctype<char>'s vtable as a 112-byte object need the fourteen-slot STT_OBJECT measured on PPSA16833 libc.prx.
2026-10-27 15:06:56 +04:00
Adrià 9149eec852 Merge pull request #11152 from thuanquang/perf/resident-page-bookkeeping
perf(libc): keep no per-page physical state for resident guest pages on Windows
2026-10-27 12:00:39 +01:00
Adrià 6a5950b5ce Merge pull request #10903 from imellag/test/libc-update-env-macos
test(libc): run the feupdateenv checks on macOS and under Rosetta 2
2026-10-27 12:00:19 +01:00
JJenkx f89e32170c fix(libc): preserve expm1 scaling association under directed rounding 2026-10-27 06:20:52 -04:00
Dean a6762cac70 Merge pull request #11589 from oneandonlydean/astro/libc-registry-atomic-v2
fix(libc): stage allocation registry changes before the host mapping changes
2026-10-27 23:02:08 +13:00