NOPL在x86系统中有什么作用? [英] What does NOPL do in x86 system?
问题描述
NOPL在x86机器上的作用是什么?感觉好像什么都没做,但是为什么总是在汇编代码里?
what is the function of NOPL in x86 machine? It feels like it doesn't do anything, but why is it always in the assembly code?
推荐答案
NOP
是一个字节的什么都不做"的操作,字面意思是无操作".NOPW、NOPL 等.. 是等效的 do-nothing,但占用字和长字节.
NOP
is a one-byte "do nothing" operation, quite literally "no operation". NOPW, NOPL, etc.. are the equivalent do-nothings, but take up word and long-sized bytes.
例如
NOP // 1byte opcode
NOP // 1byte opcode
相当于做
NOPW // 2byte opcode.
它们对于填充内容非常方便,因此代码序列从特定的内存边界开始,通过占用几个字节的指令空间,但实际上不做任何事情.
They're very handy for padding things out so a code sequence begins on a particular memory boundary, by taking up a few bytes of instruction space, yet not actually doing anything.
NOP 对 CPU 的唯一影响是将 IP
/EIP
增加 1.NOPx 等价物将增加 2、4 等......
NOP's sole effect on the CPU is to increment IP
/EIP
by 1. The NOPx equivalents will do so by 2, 4, etc...
这篇关于NOPL在x86系统中有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!