x86/insn: Add AVX512-FP16 instructions to the x86 instruction decoder
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 2 Dec 2021 09:50:29 +0000 (11:50 +0200)
committerBorislav Petkov <bp@suse.de>
Sun, 23 Jan 2022 19:38:01 +0000 (20:38 +0100)
commit16273fa4f3a2dc2c64dd8a28fe30f255a4de0e4c
tree7fe3420a7f1e85e4dd55e35af02ed1137673519f
parentcdb63ba98c5d03774bca9789e689fe62be4347b4
x86/insn: Add AVX512-FP16 instructions to the x86 instruction decoder

The x86 instruction decoder is used for both kernel instructions and
user space instructions (e.g. uprobes, perf tools Intel PT), so it is
good to update it with new instructions.

Add AVX512-FP16 instructions to x86 instruction decoder.

Note the EVEX map field is extended by 1 bit, and most instructions are in
map 5 and map 6.

Reference:
Intel AVX512-FP16 Architecture Specification
June 2021
Revision 1.0
Document Number: 347407-001US

Example using perf tools' x86 instruction decoder test:

  $ perf test -v "x86 instruction decoder" |& grep vfcmaddcph | head -2
  Decoded ok: 62 f6 6f 48 56 cb           vfcmaddcph %zmm3,%zmm2,%zmm1
  Decoded ok: 62 f6 6f 48 56 8c c8 78 56 34 12    vfcmaddcph 0x12345678(%eax,%ecx,8),%zmm2,%zmm1

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20211202095029.2165714-7-adrian.hunter@intel.com
arch/x86/include/asm/insn.h
arch/x86/lib/x86-opcode-map.txt
tools/arch/x86/include/asm/insn.h
tools/arch/x86/lib/x86-opcode-map.txt