assembly leal and movl difference [duplicate]

让人想犯罪 __ 提交于 2019-11-28 11:40:59

LEA loads an effective address generated by an address calculation into a register. MOV moves something somewhere, when using SIB addressing as source operand, it moves whatever is at the address generated by the address calculation into the target operand.

So:

leal (%eax,%ecx,4), %edx  ←  moves %eax+%ecx*4 into %edx
movl (%eax,%ecx,4), %edx  ←  moves whatever is at address %eax+%ecx*4 into %edx
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!