Add Optional 128-bit Integer Support to C++ Runtime#239
Open
AaronWebster wants to merge 4 commits intomasterfrom
Open
Add Optional 128-bit Integer Support to C++ Runtime#239AaronWebster wants to merge 4 commits intomasterfrom
AaronWebster wants to merge 4 commits intomasterfrom
Conversation
- Update prelude.emb to allow UInt and Int sizes up to 128 bits
(previously limited to 64 bits). Added documentation noting that
128-bit support requires platform support (__uint128_t/__int128_t).
- Update constraints_test.py to test with sizes > 128 bits now that
128-bit fields are valid.
- Add comprehensive unit tests for 128-bit integer support:
- emboss_bit_util_test.cc: ByteSwap, MaskToNBits, IsPowerOfTwo tests
- emboss_memory_util_test.cc: MemoryAccessor, BitBlock tests for
128-bit values including non-full-width (72, 96 bits) and
cross-64-bit-boundary operations
- emboss_prelude_test.cc: UIntView and IntView tests for 128-bit
read/write, sign extension, and CouldWriteValue
- Add int128_sizes_test.cc integration test for generated code with
128-bit integer fields (UInt128Sizes, Int128Sizes, big-endian
variants, and arrays).
- Update int128_sizes.emb documentation and remove AnonymousBits128
struct (128-bit bits types require separate implementation work).
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.
This pull request introduces support for 128-bit integers in the C++ runtime, enabling the handling of types larger than 64 bits (up to 128 bits) when the environment supports it, specifically gcc's __uint128_t and __int128_t.