Contents    Page-10    Prev    Next    Page+10    Index   

Move with Calculated Address

x86 allows very flexible addressing:

Offset from Register

   movl   %eax,-32(%rbp)  #  %eax -> i

Offset from Two Registers

   movsd %xmm0,-1296(%rbp,%rax) #  ac[]
The offset and contents of the two registers are added to form the effective address.

Offset from Two Registers with Multiplier

   movsd %xmm0,-1296(%rbp,%rax,8) #  x[]
In this case, the second register is multiplied by 2, 4, or 8 before being added. This can allow many aref expressions to be done in a single instruction.