This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] x86: Add .nop directive to assembler

On Mon, Feb 19, 2018 at 5:41 AM, Florian Weimer <> wrote:
> On 02/12/2018 08:38 PM, H.J. Lu wrote:
>> +@cindex @code{nop} directive
>> +@cindex filling memory with NOP
>> +This directive emits @var{size} bytes filled with @code{NOP}
>> +instructions.  @var{size} is absolute expression, which must be
>> +between 0 and 512.  @var{limit} specifies the size limit of a
>> +single @code{NOP} instruction.  If the comma and @var{limit} are
>> +omitted, @var{limit} is assumed to the maximum supported size of
>> +a single @code{NOP} instruction.  The valid values of @var{limit}
>> +are between 1 and 8 for 16-bit mode, between 1 and 10 for 32-bit mode,
>> +between 1 and 11 for 64-bit mode.  This directive is only allowed
>> +in text sections.
> The documentation doesn't say if it is safe to execute those NOPs on all

These NOPs are no different from other x86 instructions, like CMOVxx.

> future CPUs, or if these NOPs can only be used for non-executing padding.  I
> think it's worth clarifying that.

.nop is similar to .skip, except that it fills with NOPs.  Yes, it can be used
wherever .skip can be used.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]