x86/x86asm: support BMI1/BMI2 instructions

This CL adds decoding support for BMI (bit manipulation instructions),
specifically the VEX-encoded instructions from BMI1 and BMI2:

ANDN, BEXTR, BLSI, BLSMSK, BLSR (BMI1)
BZHI, MULX, PDEP, PEXT, RORX, SARX, SHLX, SHRX (BMI2)

Note: TZCNT is not VEX-encoded and is already supported via x86.csv.

I updated avx_tables.go with `XEDPATH=$HOME/src/xed/obj/dgen go generate ./...`
and added the output of `go run genavxtests.go` to decode.txt.

Tested with the program from issue golang/go#48584:

  :5  0x47d060  c4e2e0f2c0  ANDNQ AX, BX, AX

For golang/go#48584

Change-Id: I0e733499f2d501b5b2ff0476de021ca0c4b1e582
Reviewed-on: https://go-review.googlesource.com/c/arch/+/835785
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
7 files changed
tree: 822a896e2be5dd957ccbdc24c38c0f6fad2d7b4f
  1. arm/
  2. arm64/
  3. loong64/
  4. ppc64/
  5. riscv64/
  6. s390x/
  7. x86/
  8. .gitattributes
  9. codereview.cfg
  10. CONTRIBUTING.md
  11. go.mod
  12. go.sum
  13. LICENSE
  14. PATENTS
  15. README.md
README.md

arch

Go Reference

This repository holds machine architecture information used by the Go toolchain. The parts needed in the main Go repository are copied in.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.

The git repository is https://go.googlesource.com/arch.

The main issue tracker for the arch repository is located at https://go.dev/issues. Prefix your issue with “x/arch:” in the subject line, so it is easy to find.