Skip to content

Commit

Permalink
x86: correct/clarify comment in nops.h
Browse files Browse the repository at this point in the history
<asm-x86/nops.h> describes certain multibyte instructions as
"generic" nops when in fact they aren't nops at all in 64-bit
mode (missing REX.W causing truncation of a register).

Update the comment to state that K8 or P6 style nops should be
used in 64-bit mode. This matches what the alternatives code does.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Mikael Pettersson authored and Ingo Molnar committed Apr 17, 2008
1 parent 1415d16 commit 5d570cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/asm-x86/nops.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

/* generic versions from gas
1: nop
the following instructions are NOT nops in 64-bit mode,
for 64-bit mode use K8 or P6 nops instead
2: movl %esi,%esi
3: leal 0x00(%esi),%esi
4: leal 0x00(,%esi,1),%esi
Expand Down

0 comments on commit 5d570cb

Please sign in to comment.