Community
cancel
Showing results for 
Search instead for 
Did you mean: 
logicman112
Beginner
142 Views

The structure of ModR/M byte

Jump to solution
7.3.2.3
Increment and Decrement Instructions in 64-Bit Mode
The INC and DEC instructions are supported in 64-bit mode. However, some forms of
INC and DEC (the register operand being encoded using register extension field in the MOD R/M byte are not encodable in 64-bit mode because the opcodes are treated as REX prefixes.
------------------------------------------------------------------------------------

Where is the register extension field of ModR/M byte?
0 Kudos
1 Solution
neni
New Contributor II
142 Views
in 32 bit you can encode inc eax using two forms direct with register number (0x40+ reg_num- single byte) or using modr/m form (ff /0 - two bytes encoding, with the register being encoded in the m section of the byte and 11b as mod). in 64 bit the 1st form is gone and treated as REX prefix, but you can still use the 2nd form to encode inc/dec

View solution in original post

2 Replies
neni
New Contributor II
143 Views
in 32 bit you can encode inc eax using two forms direct with register number (0x40+ reg_num- single byte) or using modr/m form (ff /0 - two bytes encoding, with the register being encoded in the m section of the byte and 11b as mod). in 64 bit the 1st form is gone and treated as REX prefix, but you can still use the 2nd form to encode inc/dec

View solution in original post

logicman112
Beginner
142 Views
thank you neni for clear explanation.

and register extention field is the Mod/RM byte itself.
Reply