什么是NOP运算code的目的是什么? [英] What's the purpose of the nop opcode?

查看:175
本文介绍了什么是NOP运算code的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要通过MSIL并注意到有很多的 NOP说明。 MSDN文章说,他们不采取任何行动,用于如果运算code修补,以填补空间。他们使用了很多在调试版本比发布版本。我知道,这些类型的语句汇编语言用于确保运算code字边界适合,但为什么它需要MSIL?

I'm going through MSIL and noticing there are a lot of nop instructions. The MSDN article says they take no action and are used to fill space if the opcode is patched. They're used a lot more in debug builds than release builds. I know that these kinds of statements are used in assembly languages to make sure an opcode fits on a word boundary, but why is it needed in MSIL?

推荐答案

NOP指令一举数得:

NOPs serve several purposes:


  • 他们允许调试器放置一个断点即使是与他人产生code相结合的线。

  • 它允许装载机修补用不同大小的目标偏移跳。

  • 它允许code的块在特定边界,它可以很好的对高速缓存对齐。

  • 它允许增量链接覆盖code大块用一个新的部分通话,而不必担心整体功能改变大小。

这篇关于什么是NOP运算code的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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