ppc64/ppc64asm: speed up PPC64 instruction decoding

It's really slow to iterate every instruction until a match is found.
This turns decoding PPC64 binaries into a seemingly quick operation
instead of a seconds long process for go toolchain sized binaries.

Use the primary opcode to map each instruction into a list of viable
masks, and group instructions with identical masks into a map to
speed up decoding.

Change-Id: Id0d0eefbb77244c379832d8a602662e551a7568a
Reviewed-on: https://go-review.googlesource.com/c/arch/+/602717
Reviewed-by: Archana Ravindar <aravinda@redhat.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
1 file changed
tree: abc18937730c673cf036f65d80b42d4124b46be5
  1. arm/
  2. arm64/
  3. loong64/
  4. ppc64/
  5. riscv64/
  6. s390x/
  7. x86/
  8. codereview.cfg
  9. CONTRIBUTING.md
  10. go.mod
  11. go.sum
  12. LICENSE
  13. PATENTS
  14. 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://golang.org/doc/contribute.html.

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