什么是LEA为0x0(%ESI),ESI%的含义

编程入门 行业动态 更新时间:2024-10-28 02:28:39
本文介绍了什么是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%的含义

本文发布于:2023-07-27 16:01:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1223283.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:含义   LEA   ESI

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!