All of lore.kernel.org
 help / color / mirror / Atom feed
* Typo transferred from Intel manual
@ 2012-01-13 22:24 Ulrich Drepper
  2012-01-16  0:28 ` Masami Hiramatsu
  2012-01-16  0:31 ` Masami Hiramatsu
  0 siblings, 2 replies; 6+ messages in thread
From: Ulrich Drepper @ 2012-01-13 22:24 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, Masami Hiramatsu

The arch/x86/lib/x86-opcode-map.txt file contains the line

af: SCAS/W/D/Q rAX,Xv


This is what the Intel manuals show, but it's not correct.  The 'X' stands for

Memory addressed by the DS:rSI register pair (for example, MOVS, CMPS,
OUTS, or LODS).


On the other hand 'Y' means (also see the ae byte entry for SCASB):

Memory addressed by the ES:rDI register pair (for example, MOVS, CMPS,
INS, STOS, or SCAS).


Hence the following patch should be applied:



Signed-off-by: Ulrich Drepper <drepper@gmail.com>

diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt
index 5b83c51..c292885 100644
--- a/arch/x86/lib/x86-opcode-map.txt
+++ b/arch/x86/lib/x86-opcode-map.txt
@@ -219,7 +219,7 @@ ab: STOS/W/D/Q Yv,rAX
 ac: LODS/B AL,Xb
 ad: LODS/W/D/Q rAX,Xv
 ae: SCAS/B AL,Yb
-af: SCAS/W/D/Q rAX,Xv
+af: SCAS/W/D/Q rAX,Yv
 # 0xb0 - 0xbf
 b0: MOV AL/R8L,Ib
 b1: MOV CL/R9L,Ib

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Typo transferred from Intel manual
  2012-01-13 22:24 Typo transferred from Intel manual Ulrich Drepper
@ 2012-01-16  0:28 ` Masami Hiramatsu
  2012-01-16  0:31 ` Masami Hiramatsu
  1 sibling, 0 replies; 6+ messages in thread
From: Masami Hiramatsu @ 2012-01-16  0:28 UTC (permalink / raw)
  To: Ulrich Drepper
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, pp-manager

Hi Ulrich,

(2012/01/14 7:24), Ulrich Drepper wrote:
> The arch/x86/lib/x86-opcode-map.txt file contains the line
> 
> af: SCAS/W/D/Q rAX,Xv
> 
> 
> This is what the Intel manuals show, but it's not correct.  The 'X' stands for
> 
> Memory addressed by the DS:rSI register pair (for example, MOVS, CMPS,
> OUTS, or LODS).
> 
> 
> On the other hand 'Y' means (also see the ae byte entry for SCASB):
> 
> Memory addressed by the ES:rDI register pair (for example, MOVS, CMPS,
> INS, STOS, or SCAS).

I see, thanks for reporting :)

> Hence the following patch should be applied:

Could you add a comment line above the fix in x86-opcode-map.txt?
I just consider the case that someone may confuse the fix itself
is typo.

Thank you!

> 
> 
> Signed-off-by: Ulrich Drepper <drepper@gmail.com>
> 
> diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt
> index 5b83c51..c292885 100644
> --- a/arch/x86/lib/x86-opcode-map.txt
> +++ b/arch/x86/lib/x86-opcode-map.txt
> @@ -219,7 +219,7 @@ ab: STOS/W/D/Q Yv,rAX
>  ac: LODS/B AL,Xb
>  ad: LODS/W/D/Q rAX,Xv
>  ae: SCAS/B AL,Yb
> -af: SCAS/W/D/Q rAX,Xv
> +af: SCAS/W/D/Q rAX,Yv
>  # 0xb0 - 0xbf
>  b0: MOV AL/R8L,Ib
>  b1: MOV CL/R9L,Ib
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Typo transferred from Intel manual
  2012-01-13 22:24 Typo transferred from Intel manual Ulrich Drepper
  2012-01-16  0:28 ` Masami Hiramatsu
@ 2012-01-16  0:31 ` Masami Hiramatsu
  2012-01-16  0:40   ` Ulrich Drepper
  1 sibling, 1 reply; 6+ messages in thread
From: Masami Hiramatsu @ 2012-01-16  0:31 UTC (permalink / raw)
  To: Ulrich Drepper
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, yrl.pp-manager.tt

Hi Ulrich,

(2012/01/14 7:24), Ulrich Drepper wrote:
> The arch/x86/lib/x86-opcode-map.txt file contains the line
> 
> af: SCAS/W/D/Q rAX,Xv
> 
> 
> This is what the Intel manuals show, but it's not correct.  The 'X' stands for
> 
> Memory addressed by the DS:rSI register pair (for example, MOVS, CMPS,
> OUTS, or LODS).
> 
> 
> On the other hand 'Y' means (also see the ae byte entry for SCASB):
> 
> Memory addressed by the ES:rDI register pair (for example, MOVS, CMPS,
> INS, STOS, or SCAS).

I see, thanks for reporting :)

> Hence the following patch should be applied:

Could you add a comment line above the fix in x86-opcode-map.txt?
I just consider the case that someone may confuse the fix itself
is typo.

Thank you!

> 
> 
> Signed-off-by: Ulrich Drepper <drepper@gmail.com>
> 
> diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt
> index 5b83c51..c292885 100644
> --- a/arch/x86/lib/x86-opcode-map.txt
> +++ b/arch/x86/lib/x86-opcode-map.txt
> @@ -219,7 +219,7 @@ ab: STOS/W/D/Q Yv,rAX
>  ac: LODS/B AL,Xb
>  ad: LODS/W/D/Q rAX,Xv
>  ae: SCAS/B AL,Yb
> -af: SCAS/W/D/Q rAX,Xv
> +af: SCAS/W/D/Q rAX,Yv
>  # 0xb0 - 0xbf
>  b0: MOV AL/R8L,Ib
>  b1: MOV CL/R9L,Ib
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Typo transferred from Intel manual
  2012-01-16  0:31 ` Masami Hiramatsu
@ 2012-01-16  0:40   ` Ulrich Drepper
  2012-01-16  8:41     ` Masami Hiramatsu
  2012-01-16  9:02     ` [tip:perf/urgent] x86/kprobes: Fix typo " tip-bot for Ulrich Drepper
  0 siblings, 2 replies; 6+ messages in thread
From: Ulrich Drepper @ 2012-01-16  0:40 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, yrl.pp-manager.tt

On Sun, Jan 15, 2012 at 19:31, Masami Hiramatsu
<masami.hiramatsu.pt@hitachi.com> wrote:
> Could you add a comment line above the fix in x86-opcode-map.txt?
> I just consider the case that someone may confuse the fix itself
> is typo.

Find the changed patch below.


Signed-off-by: Ulrich Drepper <drepper@gmail.com>

diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt
index 5b83c51..c292885 100644
--- a/arch/x86/lib/x86-opcode-map.txt
+++ b/arch/x86/lib/x86-opcode-map.txt
@@ -219,7 +219,9 @@ ab: STOS/W/D/Q Yv,rAX
 ac: LODS/B AL,Xb
 ad: LODS/W/D/Q rAX,Xv
 ae: SCAS/B AL,Yb
-af: SCAS/W/D/Q rAX,Xv
+# Note: The May 2011 Intel manual shows Xv for the second parameter of the
+# next instruction but Yv is correct
+af: SCAS/W/D/Q rAX,Yv
 # 0xb0 - 0xbf
 b0: MOV AL/R8L,Ib
 b1: MOV CL/R9L,Ib

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Re: Typo transferred from Intel manual
  2012-01-16  0:40   ` Ulrich Drepper
@ 2012-01-16  8:41     ` Masami Hiramatsu
  2012-01-16  9:02     ` [tip:perf/urgent] x86/kprobes: Fix typo " tip-bot for Ulrich Drepper
  1 sibling, 0 replies; 6+ messages in thread
From: Masami Hiramatsu @ 2012-01-16  8:41 UTC (permalink / raw)
  To: Ulrich Drepper
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, yrl.pp-manager.tt

(2012/01/16 9:40), Ulrich Drepper wrote:
> On Sun, Jan 15, 2012 at 19:31, Masami Hiramatsu
> <masami.hiramatsu.pt@hitachi.com> wrote:
>> Could you add a comment line above the fix in x86-opcode-map.txt?
>> I just consider the case that someone may confuse the fix itself
>> is typo.
> 
> Find the changed patch below.
> 
> 
> Signed-off-by: Ulrich Drepper <drepper@gmail.com>

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Thank you!

> 
> diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt
> index 5b83c51..c292885 100644
> --- a/arch/x86/lib/x86-opcode-map.txt
> +++ b/arch/x86/lib/x86-opcode-map.txt
> @@ -219,7 +219,9 @@ ab: STOS/W/D/Q Yv,rAX
>  ac: LODS/B AL,Xb
>  ad: LODS/W/D/Q rAX,Xv
>  ae: SCAS/B AL,Yb
> -af: SCAS/W/D/Q rAX,Xv
> +# Note: The May 2011 Intel manual shows Xv for the second parameter of the
> +# next instruction but Yv is correct
> +af: SCAS/W/D/Q rAX,Yv
>  # 0xb0 - 0xbf
>  b0: MOV AL/R8L,Ib
>  b1: MOV CL/R9L,Ib
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tip:perf/urgent] x86/kprobes: Fix typo transferred from Intel manual
  2012-01-16  0:40   ` Ulrich Drepper
  2012-01-16  8:41     ` Masami Hiramatsu
@ 2012-01-16  9:02     ` tip-bot for Ulrich Drepper
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot for Ulrich Drepper @ 2012-01-16  9:02 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, masami.hiramatsu.pt, drepper, tglx,
	mingo

Commit-ID:  8d973b624ece3b85cfae9474935795d034f72faf
Gitweb:     http://git.kernel.org/tip/8d973b624ece3b85cfae9474935795d034f72faf
Author:     Ulrich Drepper <drepper@gmail.com>
AuthorDate: Sun, 15 Jan 2012 19:40:24 -0500
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 16 Jan 2012 08:20:36 +0100

x86/kprobes: Fix typo transferred from Intel manual

The arch/x86/lib/x86-opcode-map.txt file [used by the
kprobes instruction decoder] contains the line:

  af: SCAS/W/D/Q rAX,Xv

This is what the Intel manuals show, but it's not correct.
The 'X' stands for:

  Memory addressed by the DS:rSI register pair (for example, MOVS, CMPS, OUTS, or LODS).

On the other hand 'Y' means (also see the ae byte entry for
SCASB):

  Memory addressed by the ES:rDI register pair (for example, MOVS, CMPS, INS, STOS, or SCAS).

Signed-off-by: Ulrich Drepper <drepper@gmail.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/CAOPLpQfytPyDEBF1Hbkpo7ovUerEsstVGxBr%3DEpDL-BKEMaqLA@mail.gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/lib/x86-opcode-map.txt |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt
index a793da5..8641bbb 100644
--- a/arch/x86/lib/x86-opcode-map.txt
+++ b/arch/x86/lib/x86-opcode-map.txt
@@ -210,7 +210,9 @@ ab: STOS/W/D/Q Yv,rAX
 ac: LODS/B AL,Xb
 ad: LODS/W/D/Q rAX,Xv
 ae: SCAS/B AL,Yb
-af: SCAS/W/D/Q rAX,Xv
+# Note: The May 2011 Intel manual shows Xv for the second parameter of the
+# next instruction but Yv is correct
+af: SCAS/W/D/Q rAX,Yv
 # 0xb0 - 0xbf
 b0: MOV AL/R8L,Ib
 b1: MOV CL/R9L,Ib

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-16  9:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 22:24 Typo transferred from Intel manual Ulrich Drepper
2012-01-16  0:28 ` Masami Hiramatsu
2012-01-16  0:31 ` Masami Hiramatsu
2012-01-16  0:40   ` Ulrich Drepper
2012-01-16  8:41     ` Masami Hiramatsu
2012-01-16  9:02     ` [tip:perf/urgent] x86/kprobes: Fix typo " tip-bot for Ulrich Drepper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.