Re: [PATCH -tip v14 01/12] x86: instruction decoder API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Frederic Weisbecker wrote:
On Thu, Aug 13, 2009 at 04:34:13PM -0400, 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 include a few SSE and FP opcodes (for setup), because
those opcodes are used in the kernel.



I'm getting the following build error on an old K7 box:

arch/x86/lib/inat.c: In function ‘inat_get_opcode_attribute’:
arch/x86/lib/inat.c:29: erreur: ‘inat_primary_table’ undeclared (first use in this function)
arch/x86/lib/inat.c:29: erreur: (Each undeclared identifier is reported only once
arch/x86/lib/inat.c:29: erreur: for each function it appears in.)

Thanks for reporting!
Hmm, it seems that inat-tables.c is not correctly generated.
Could you tell me which awk you used and send the inat-tables.c?

Thank you,

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@xxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux