Repository navigation
feat(libc): export the Dinkumware float characteristic tables - #8576
Merged
oneandonlydean merged 1 commit intoOct 21, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
Add _Flt, _Dbl and _Ldbl, the 80-byte tables behind Dinkumware's float.h macros, with the values the console's libc.prx exports. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Exports
_Flt(+SeQg8c1WC0),_Dbl(e+hi-tOrDZU) and_Ldbl(43u-nm1hQc8), the tables behind Dinkumware'sfloat.hmacros, which the systemlibc.prx(buildJ03093718) exports and no source incore/libs/prxor open pull request defines yet.Each table is 80 bytes, read from that module's data: six
ints (digits, mantissa digits, maximum and minimum decimal exponent, maximum and minimum binary exponent), 8 bytes of zero padding, then epsilon, maximum and minimum as 16-byte_Dconstvalues:_Flt0x340000000x7f7fffff0x00800000_Dbl0x3cb00000000000000x7fefffffffffffff0x0010000000000000_Ldbl_Ldbldescribes the x87 80-bit format, as Sony'slong doubleis. They go incore/libs/prx/libc/src/Math.cppasDinkumwareFloatCharacteristics, in a spot away from the lines #6085 and #8570 change.CheckDinkumwareFloatCharacteristicsincore/libs/tests/GuestMath.cppchecks the layout, the integers against<cfloat>(the x87 values for_Ldbl), the three values againststd::numeric_limitswith their unused bytes zero, and the zero padding.Tested
Windows 10, MSYS2 MinGW-w64 GCC 15.2.0 (
mingw64, not the WinLibs UCRT toolchain from BUILD.md). I did not configure the full CMake build.Math.cppbuilds with-Wall -Wextra -Werror -fno-asynchronous-unwind-tables, andGuestMath.cppcompiles without warnings.CheckDinkumwareFloatCharacteristics(copied unchanged fromGuestMath.cpp) compiled against thisMath.cpppasses; againstmain'sMath.cppit fails to link on all three symbols.Against the console's own data: I mapped that
libc.prx's segments into memory, applied its relocations and compared the three tables with the objects the module exports under the same NIDs. All 80 bytes are identical for each.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branch feat/libc-float-characteristicsreports no overlap. It could not compare #6044, #6158 and #7201 (each conflicts withmain); I checked them by hand: #6044 only renamesGuestMath.cpp, and #6158 and #7201 change other lines of these files and add none of these exports. Not tested on Linux; no title was run.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)🤖 Generated with Claude Code