diff options
author | Ben Bridle <ben@derelict.engineering> | 2025-04-12 10:19:26 +1200 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2025-04-12 10:19:26 +1200 |
commit | dddb76c4ad504022fa4f4c4f6965c08da22c387e (patch) | |
tree | 735d80e0a18566bfa649afe5c9e1e6c076ae1c33 /src/types/mod.rs | |
parent | c724c9157dbc4721fa8ed93033cd9699c9652277 (diff) | |
download | torque-asm-dddb76c4ad504022fa4f4c4f6965c08da22c387e.zip |
Fix width checks for negative integers
The width of a negative integer was previously being counted in the
same way as for a positive integer, by inverting the bits to make it a
positive integer and then finding the placement of the highest-order 1
bit.
The actual width of a negative integer will always be one greater than
this value however, because the highest-order 1 bit of an inverted
negative integer will always have directly above it a significant 0 bit
used as the sign bit.
Diffstat (limited to 'src/types/mod.rs')
0 files changed, 0 insertions, 0 deletions