internal/simdgen: compute CPU feature in XED decoder

Currently, the XED decoder emits the raw "EXTENSION" and "ISA_SET"
fields directly from the XED, and these are translated into a CPU
feature by godefs using a bunch of fairly ad hoc string manipulations.

Replace this with computing the CPU feature directly in the XED
decoder. The extension and isa_set are strictly XED concepts, while
"CPU features" are generic concepts. Thus, this should be the role of
the XED decoder.

We also use an explicit mapping table rather than string
manipulations. These CPU feature names appear in the API, and thus
it's important that we pay attention to their names.

No effect on generated code.

Change-Id: I1c7c79c461d57b2cd78cfa81f376683ae33c69b1
Reviewed-on: https://go-review.googlesource.com/c/arch/+/694858
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Auto-Submit: Austin Clements <austin@google.com>
16 files changed
tree: 73d8fed3fa61e335d6aac302fd5e159cc7866bb8
  1. arm/
  2. arm64/
  3. internal/
  4. loong64/
  5. ppc64/
  6. riscv64/
  7. s390x/
  8. x86/
  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.