* [PATCH 2.6.25-rc5] x86: correct/clarify comment in nops.h
@ 2008-03-11 15:43 Mikael Pettersson
2008-03-11 16:19 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2008-03-11 15:43 UTC (permalink / raw)
To: tglx, mingo, hpa; +Cc: linux-kernel
<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>
---
diff -rupN linux-2.6.25-rc5/include/asm-x86/nops.h linux-2.6.25-rc5.x86-generic-nops-arent/include/asm-x86/nops.h
--- linux-2.6.25-rc5/include/asm-x86/nops.h 2008-03-10 20:05:39.000000000 +0100
+++ linux-2.6.25-rc5.x86-generic-nops-arent/include/asm-x86/nops.h 2008-03-11 16:22:22.000000000 +0100
@@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH 2.6.25-rc5] x86: correct/clarify comment in nops.h
2008-03-11 15:43 [PATCH 2.6.25-rc5] x86: correct/clarify comment in nops.h Mikael Pettersson
@ 2008-03-11 16:19 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-03-11 16:19 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: tglx, mingo, hpa, linux-kernel
* Mikael Pettersson <mikpe@it.uu.se> wrote:
> <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.
> /* 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
thanks Mikael, applied.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-11 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11 15:43 [PATCH 2.6.25-rc5] x86: correct/clarify comment in nops.h Mikael Pettersson
2008-03-11 16:19 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox