LEA EAX,[EAX] 有什么意义? [英] What's the point of LEA EAX, [EAX]?
本文介绍了LEA EAX,[EAX] 有什么意义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
LEA EAX, [EAX]
我在用 Microsoft C 编译器编译的二进制文件中遇到了这条指令.它显然不能改变 EAX 的值.那为什么会在那里呢?
I encountered this instruction in a binary compiled with the Microsoft C compiler. It clearly can't change the value of EAX. Then why is it there?
推荐答案
这是一个NOP
.
以下通常用作NOP
.它们都做同样的事情,但它们导致不同长度的机器代码.根据对齐要求选择其中之一:
The following are typcially used as NOP
. They all do the same thing but they result in machine code of different length. Depending on the alignment requirement one of them is chosen:
xchg eax, eax = 90
mov eax, eax = 89 C0
lea eax, [eax + 0x00] = 8D 40 00
这篇关于LEA EAX,[EAX] 有什么意义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文