什么是LEA为0x0(%ESI),ESI%的含义 [英] What is the meaning of lea 0x0(%esi),%esi

查看:786
本文介绍了什么是LEA为0x0(%ESI),ESI%的含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

lea    0x0(%esi),%esi

我相信它有没有结果,并简单地填充空间。这样的话?

I believe it has no result and is simply filling space. Is this the case?

推荐答案

它是一个NOP。它增加了%ESI和为0x0的内容,并把结果ESI%。有人要么有一个笨拙的code发电机或需要填补N个字节,其中,该指令是正确的大小。

Its a NOP. It adds the contents of %esi and 0x0, and puts the result in %esi. Somebody either has a clumsy code generator or needs to fill N bytes, where this instruction is the right size.

LEA指令的执行相当快(通常1个时钟),所以这是N多的NOP好多了。

LEA instructions execute quite fast (typically 1 clock), so this is a lot better than N nops.

在X86是因为古怪,因为它是具有多种有效地不做任何事情,但填写不同的字节数的说明。您可能会发现不同长度的其他无用的指令。你会发现,长指令,但在1个时钟或更少的执行。

The x86 being as quirky as it is, has a variety of instructions that effectively don't do anything but fill differing numbers of bytes. You may find other useless instructions of different lengths. You tend to find instructions that are long but execute in 1 clock or less.

AMD的X86-64手册中有一些建议,以什么应该被用于NOP指令;他们建议的preFIX运算codeS重复的实际的NOP,IIRC之前的次数中的一个。这样的preFIX运codeS消耗很快通过取指令引擎;主要是他们的成本被隐藏在指令pre取,而不是在指令执行时间。

The AMD x86-64 manual has some suggestions as to what should be used for NOPs; they suggest one of the prefix opcodes repeated a number of times before an actual NOP, IIRC. Such prefix opcodes are consumed very quickly by the instruction fetch engine; mostly their cost is hidden in instruction pre-fetch, and not in instruction execution time.

这篇关于什么是LEA为0x0(%ESI),ESI%的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆