<<< SIB (Scaled Index Byte) Layout     Index     Encoding ADD Instruction Example >>>

11. Scaled Indexed Addressing Mode

  • [ reg32 + eax*n ] MOD = 00
    [ reg32 + ebx*n ] 
    [ reg32 + ecx*n ]
    [ reg32 + edx*n ]
    [ reg32 + ebp*n ]
    [ reg32 + esi*n ]
    [ reg32 + edi*n ]
    
    [ disp + reg8 + eax*n ] MOD = 01
    [ disp + reg8 + ebx*n ]
    [ disp + reg8 + ecx*n ]
    [ disp + reg8 + edx*n ]
    [ disp + reg8 + ebp*n ]
    [ disp + reg8 + esi*n ]
    [ disp + reg8 + edi*n ]
    
    [ disp + reg32 + eax*n ] MOD = 10
    [ disp + reg32 + ebx*n ]
    [ disp + reg32 + ecx*n ]
    [ disp + reg32 + edx*n ]
    [ disp + reg32 + ebp*n ]
    [ disp + reg32 + esi*n ]
    [ disp + reg32 + edi*n ]
    
    [ disp + eax*n ] MOD = 00, and
    [ disp + ebx*n ] BASE field = 101
    [ disp + ecx*n ]
    [ disp + edx*n ]
    [ disp + ebp*n ]
    [ disp + esi*n ]
    [ disp + edi*n ]
    
  •  

    Note: n = 1, 2, 4, or 8.

  • In each scaled indexed addressing mode the MOD field in MOD-REG-R/M byte specifies the size of the displacement. It can be zero, one, or four bytes:

        MOD R/M  Addressing Mode
        --- ---  --------------------------- 
         00 100  SIB
         01 100  SIB + disp8
         10 100  SIB + disp32
    
  • The Base and Index fields of the SIB byte select the base and index registers, respectively.

  • Note that this addressing mode does not allow the use of the ESP register as an index register. Presumably, Intel left this particular mode undefined to provide the ability to extend the addressing modes in a future version of the CPU.


<<< SIB (Scaled Index Byte) Layout     Index     Encoding ADD Instruction Example >>>