]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/ppc64: add ISA 3.1 instructions
authorPaul E. Murphy <murp@ibm.com>
Fri, 21 May 2021 16:26:01 +0000 (11:26 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 15 Sep 2022 21:12:43 +0000 (21:12 +0000)
commit3a067b288ef235fdbc88220ea5bb384e0474f09b
tree2c5209aa0c57d90771edab8e18797890d58292d1
parentc075c21ba532bd4d00158708e8c2981b8fdc19ca
cmd/internal/obj/ppc64: add ISA 3.1 instructions

Use ppc64map (from x/arch) to generate ISA 3.1 support for the
assembler. A new file asm9_gtables.go is added which contains
generated code to encode ISA 3.1 instructions, a function to assist
filling out the oprange structure, a lookup table for the fixed
bits of each instructions, and a slice of string name. Generated
functions are shared if their bitwise encoding match, and the
translation from an obj.Prog structure matches.

The generated file is entirely self-contained, and does not require
regenerating any other files for changes within it. If opcodes in
a.out.go are reordered or changed, anames.go must be updated in
the same way as before.

Future improvements could shrink the generated opcode table
to 32 bit entries as there is much less variation of the
encoding of the prefix word, but it is not always identical
for instructions which share a similar encoding of arguments
(e.g PLWA and PLWZ).

Updates #44549

Change-Id: Ie83fa02497c9ad2280678d68391043d3aae63175
Reviewed-on: https://go-review.googlesource.com/c/go/+/419535
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jenny Rakoczy <jenny@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Jenny Rakoczy <jenny@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Jenny Rakoczy <jenny@golang.org>
src/cmd/asm/internal/arch/arch.go
src/cmd/asm/internal/asm/endtoend_test.go
src/cmd/asm/internal/asm/testdata/ppc64_p10.s [new file with mode: 0644]
src/cmd/internal/obj/ppc64/a.out.go
src/cmd/internal/obj/ppc64/anames.go
src/cmd/internal/obj/ppc64/asm9.go
src/cmd/internal/obj/ppc64/asm9_gtables.go [new file with mode: 0644]
src/cmd/internal/obj/ppc64/list9.go
src/cmd/internal/obj/ppc64/obj9.go