LEAQ

InstructionOperandsEffectDescription
leaqS, DD &SLoad effective address

leaq is a variant of MOV. The first operand appears to be a memory address, but instead of reading from the designated location, the instruction copies the effective address to the designated location (a register).

Unary Operations

InstructionOperandsEffectDescription
inc[bwlq]DD D + 1Increment
dec[bwlq]DD D - 1Decrement

Binary Operations

InstructionOperandsEffectDescription
add[bwlq]S, DD D + SAddition
sub[bwlq]S, DD D - SSubtraction
imul[bwlq]S, DD D * SMultiplication

Shift Operations

InstructionOperandsEffectDescription
sal[bwlq]k, DD D << kLeft shift
shl[bwlq]k, DD D << kLeft shift
sar[bwlq]k, DD D >> kArithmetic right shift
shr[bwlq]k, DD D >>> kLogical right shift

Bibliography

  • Bryant, Randal E., and David O’Hallaron. Computer Systems: A Programmer’s Perspective. Third edition, Global edition. Always Learning. Pearson, 2016.