X86: Fix movabsq immediates >= 2^63 printed as decimal in ATT syntax #2843
+2
−1
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.
Fix issue #2817: In AT&T syntax, movabsq instructions with immediate values >= 2^63 (0x8000000000000000) were incorrectly printed in decimal instead of hexadecimal.
Root cause: The comparison 'imm > HEX_THRESHOLD' used a signed int64_t, so values with bit 63 set appeared negative and failed the comparison.
Fix: Cast imm to uint64_t for the comparison to handle the full 64-bit unsigned range correctly.
Added test cases for issue 2817 covering both 0x8000000000000000 and 0xffffffffffffffff in ATT syntax.
Your checklist for this pull request
Detailed description
...
Test plan
...
Closing issues
...