What is the 0x10 in the “leal 0x10(

前端 未结 4 675
故里飘歌
故里飘歌 2020-11-28 09:29

What the function is of the 0x10 in regards to this LEAL instruction? Is it a multiply or addition or is something else?

leal 0x10(%ebx), %eax
4条回答
  •  自闭症患者
    2020-11-28 09:39

    lea stands for "load effective address"; it is a way to use the sophisticated adressing modes of the IA32 instruction set to do arithmetic. The l suffix is a way to distinguish the size of instruction operands in the syntax of GNU as, that you have on your Linux box.

    So, in short, yes, it's a kind of addition instruction. It can also handle multiplications by 2, 4, or 8 at the same time.

    See also this related question (where they are using the Intel syntax to discuss the same instruction):

提交回复
热议问题