本文介绍了什么是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 at all?

推荐答案

这是一个 NOP

被typcially作为<$​​ C $ C> NOP 下面。他们都做同样的事情,但他们会导致不同长度的机器code。取决于对齐要求其中之一被选择

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]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 13:11