问题描述
是什么NOPL在x86机器的功能?这感觉就像它没有做任何事情,但为什么它总是在组装code?
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等。是相当于做,空话,而是采取了字和长尺寸的字节。
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.
他们的填充出来的东西非常方便所以code序列开始一个特定的内存边界上,由占用的指令空间的几个字节,但实际上没有做任何事情。
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系统上做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!