ppc64asm,ppc64map: enable parsing of prefixed ISA 3.1 insn entries

ppc64map is modified to store a second set of Mask/Value/DontCare
fields in its internal Inst structure.  The existing fields are
used to store the prefix, and the newly added fields store similar
information about the second instruction word. It is worth noting
that prefixed instructions are 64 bits long, but are encoded like
a pair of regular (32 bit) instructions.

This requires some refactoring of ppc64map to support decoding fields
from the second instruction word.  To do this, we add a Word field
as needed to indicate the instruction word (0 == prefix, 1 == suffix),
and field names are updated to reflect bit positions as if such insn
extended to 64 bits.

All prefixed instructions share the same primary opcode, so the
decode logic will need to be updated in a subsequent patch to choose
the correct prefixed instruction when decoding.

Note, that while enabling prefix support, a few ISA bugs were found
and reported. YMSK should be 2 bits, not 4. Likewise, the nop
extended mnemonic is added as it shows up more frequently when
prefixed instructions need to be moved to avoid crossing a 64B
boundary.

Change-Id: I8fd43bbd05738e8d70267efed447022c36c4616f
Reviewed-on: https://go-review.googlesource.com/c/arch/+/307352
Run-TryBot: Carlos Eduardo Seo <carlos.seo@linaro.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
6 files changed
tree: a8652721956b49709785391e4188db7e150ec030
  1. AUTHORS
  2. CONTRIBUTING.md
  3. CONTRIBUTORS
  4. LICENSE
  5. PATENTS
  6. README.md
  7. arm/
  8. arm64/
  9. codereview.cfg
  10. go.mod
  11. go.sum
  12. ppc64/
  13. x86/
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.