This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RESEND][ PATCH -tip -v9 1/7] x86: instruction decoder API
- From: "H. Peter Anvin" <hpa at zytor dot com>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Ingo Molnar <mingo at elte dot hu>, Steven Rostedt <rostedt at goodmis dot org>, lkml <linux-kernel at vger dot kernel dot org>, systemtap <systemtap at sources dot redhat dot com>, kvm <kvm at vger dot kernel dot org>, DLE <dle-develop at lists dot sourceforge dot net>, Jim Keniston <jkenisto at us dot ibm dot com>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Frederic Weisbecker <fweisbec at gmail dot com>, Andi Kleen <ak at linux dot intel dot com>, Vegard Nossum <vegard dot nossum at gmail dot com>, Avi Kivity <avi at redhat dot com>, PrzemysÅawPaweÅczyk <przemyslaw at pawelczyk dot it>
- Date: Fri, 12 Jun 2009 15:50:57 -0700
- Subject: Re: [RESEND][ PATCH -tip -v9 1/7] x86: instruction decoder API
- References: <20090612224447.17311.72404.stgit@localhost.localdomain> <20090612224455.17311.19421.stgit@localhost.localdomain>
Masami Hiramatsu wrote:
> Add x86 instruction decoder to arch-specific libraries. This decoder
> can decode x86 instructions used in kernel into prefix, opcode, modrm,
> sib, displacement and immediates. This can also show the length of
> instructions.
>
> This version introduces instruction attributes for decoding instructions.
> The instruction attribute tables are generated from the opcode map file
> (x86-opcode-map.txt) by the generator script(gen-insn-attr-x86.awk).
>
> Currently, the opcode maps are based on opcode maps in Intel(R) 64 and
> IA-32 Architectures Software Developers Manual Vol.2: Appendix.A,
> and consist of below two types of opcode tables.
>
> 1-byte/2-bytes/3-bytes opcodes, which has 256 elements, are
> written as below;
>
> Table: table-name
> Referrer: escaped-name
> opcode: mnemonic|GrpXXX [operand1[,operand2...]] [(extra1)[,(extra2)...] [| 2nd-mnemonic ...]
> (or)
> opcode: escape # escaped-name
> EndTable
>
> Group opcodes, which has 8 elements, are written as below;
>
> GrpTable: GrpXXX
> reg: mnemonic [operand1[,operand2...]] [(extra1)[,(extra2)...] [| 2nd-mnemonic ...]
> EndTable
>
> These opcode maps do NOT include most of SSE and FP opcodes, because
> those opcodes are not used in the kernel.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
> Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Andi Kleen <ak@linux.intel.com>
> Cc: Vegard Nossum <vegard.nossum@gmail.com>
> Cc: Avi Kivity <avi@redhat.com>
> Cc: PrzemysÅaw PaweÅczyk <przemyslaw@pawelczyk.it>
> ---
>
The decoder looks good by now.
Acked-by: H. Peter Anvin <hpa@zytor.com>
-hpa