Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
68 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

Accepted Solutions
Highlighted
New Contributor II
68 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

0 Kudos
2 Replies
Highlighted
New Contributor II
69 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

0 Kudos
Highlighted
Beginner
68 Views
thank you neni for clear explanation.

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