ModR/M and SIB Bytes

The ModR/M and SIB bytes follow the opcode byte(s) in many of the processor instructions. They contain the following information:

The ModR/M byte contains three fields of information:

The based indexed forms of 32-bit addressing require the SIB byte. The presence of the SIB byte is indicated by certain encodings of the ModR/M byte. The SIB byte then includes the following fields:

ModR / MandSIBByteFormats
┌────────────────────────────────────────────────┐
│                  MODR/M BYTE                   │
│                                                │
│     7     6    5     4     3   2    1     0    │
│   ┌──────────┬────────────────┬──────────────┐ │
│   │  MOD     │   REG/OPCODE   │     R/M      │ │
│   └──────────┴────────────────┴──────────────┘ │
│                                                │
│            SIB (SCALE INDEX BASE) BYTE         │
│                                                │
│     7     6    5     4     3   2    1     0    │
│   ┌──────────┬────────────────┬──────────────┐ │
│   │    SS    │     INDEX      │     BASE     │ │
│   └──────────┴────────────────┴──────────────┘ │
│                                                │
└────────────────────────────────────────────────┘


[Back: Instruction Format]
[Next: 16-Bit Addressing Forms with the ModR/M Byte]