ppc64asm,ppc64map: improve gnu branch decoding, and other misc

Rewrite the branch decoding to be more consistent with objdump.
Comments are taken from ISA 3.1 sections on the BO field (book i, 2.4),
and Appendix C.2 for extended branch mnemonics.  Also, generate all
interesting cases to verify.  Interesting cases are those which
don't choke objdump (e.g not setting z bits in BO, or setting at to

Likewise, fixup handling of mtfs* instructions.  The field names are
similar to condition registers, but these operate on FPSCR bits and
fields.  Decode them as immediates, similar to objdump.

Likewise, when printing CR bits, use gnu/ISA syntax of 4*crN+B when
N > 0, and B is a named CR bit.

Likewise, when running testcode, track the "PC".  This keeps the
generated tests working without hacks.  This requires fixing up
some offsets in the handwritten tests.  Similarly, allow testing
of multiple files in the test directory which are prefixed with

Likewise, allow appropriately prefixed to run these tests too.  This
allows running tests on non-native systems (e.g with IBM's advance
toolchain on an x86 host).

Change-Id: I1d6b2fc78a22a182524fdec596f05a10d25363c5
Reviewed-on: https://go-review.googlesource.com/c/arch/+/293270
Trust: Carlos Eduardo Seo <carlos.seo@linaro.org>
Run-TryBot: Carlos Eduardo Seo <carlos.seo@linaro.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
8 files changed
tree: 9dd32ed0230be5cfdf97f2e7a22705dc6517d803
  6. README.md
  7. arm/
  8. arm64/
  9. codereview.cfg
  10. go.mod
  11. go.sum
  12. ppc64/
  13. x86/


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.