Remix.run Logo
st_goliath 7 hours ago

Fun little tidbit: The 0x40-0x4f range used for the REX prefix actually clashes with the single-byte encodings for increment/decrement.

When AMD designed the 64 bit extension, they had run out of available single-byte opcodes to use as a prefix and decided to re-use those. The INC/DEC instructions are still available in 64 bit mode, but not in their single-byte encodings.

TheAdamist 2 hours ago | parent [-]

Which clever code can utilize to determine which mode its running in and branch appropriately depending if the inc/dec were executed or not.