Commit a1b2e0d
authored
X86: Fix movabsq immediates >= 2^63 printed as decimal in ATT syntax (#2843)
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.
Note: Regression tests for exact asm_text format cannot be added because
cstest's compare_asm_text() normalizes hex/decimal representations.1 parent 1bc76ea commit a1b2e0d
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
| 735 | + | |
| 736 | + | |
736 | 737 | | |
737 | 738 | | |
738 | 739 | | |
| |||
0 commit comments