Commit Graph
3 Commits
Author SHA1 Message Date
BunnyFlandClaude Opus 5.5 17aebbdc16 test(libSceLibcInternal): stop pinning the out-of-range _Daysto month to a throw
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 04:33:29 +01:00
BunnyFlandClaude Opus 5.5 0986fdea42 fix(libSceLibcInternal): compute _Daysto's leap days without signed overflow
The firmware subtracts and shifts as unsigned 32-bit values, so 4 - year
wraps for the five years from INT_MIN to INT_MIN + 4 instead of
overflowing; do the same, and test both sides of that range and INT_MAX.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 04:20:44 +01:00
BunnyFlandClaude Opus 5.5 bbfc44a57c feat(libSceLibcInternal): answer _Daysto, _FXp_getw and _Isdst as firmware 13.42 does
_Isdst returns -1. _Daysto(year, month) adds the leap days before the year
to the common or leap days-before-month table, as Dinkumware's _Daysto does,
and throws for a month outside the twelve table entries the module would
index past. _FXp_getw sums up to four float parts as Dinkumware's _Xp_getw
does. Read to the return from firmware 13.42's libSceLibcInternal,
disassembly only, not measured on a console.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 04:04:19 +01:00