ppc64asm,ppc64map: enable prefixed insn decoding support

ISA 3.1 introduces prefixed instructions. These are 64b
instructions which look like 2 consecutive instructions.
These allow 34 bit constant displancements and PC-relative
addressing. When decoded into an Inst structure, we place
the prefix inside the Enc field. The prefix opcode is unique,
and thus cannot be confused with any existing ISA 3.1
instruction. The second instruction word (the "suffix") is
placed into a new field named SuffixEnc.

Rework the decoder table to use 64 bit instruction sizes, and
shift the regular instructions into the upper 32 bits.

Likewise, extend bitfield parsing to support 2 words and
aggregate values beyond 32 bits (prefixed add and load
generate 34 bit constants/displacements).

Likewise, support nop extended mnemonic. These show
up when fixing prefixed instructions to avoid crossing
a 64B boundary. This happens in the generated decoding
test cases.

Likewise, handle pcrel and prefixed load address extended
mnemonics to match objdump.

Finally, fix some broken documentation propagated from
the parser generation. YMSK should only be the upper two
bits of the field described as 4 bits. These fixups have
been backported to the ISA parser tool.

Change-Id: I21e311f93014cf176f3f6b155849a7359af54763
Reviewed-on: https://go-review.googlesource.com/c/arch/+/307353
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Eduardo Seo <carlos.seo@linaro.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Trust: Carlos Eduardo Seo <carlos.seo@linaro.org>
9 files changed
tree: 6d9f1ce1b8641943e8880b8249a60dfec7397776
  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.