diff options
| author | Junyang Shao <shaojunyang@google.com> | 2026-02-04 17:19:04 +0000 |
|---|---|---|
| committer | Junyang Shao <shaojunyang@google.com> | 2026-03-20 10:02:17 -0700 |
| commit | 79f3d38562bb62221313aacaf1b8d18178b1ff67 (patch) | |
| tree | 0cd52d1f8e1b3de0b58951d7ff7a3341f9e0d0b9 /src/internal/pkgbits/pkgbits_test.go | |
| parent | a45c8032bbfdfb4c43cb56536f987501e6709a70 (diff) | |
| download | go-79f3d38562bb62221313aacaf1b8d18178b1ff67.tar.xz | |
cmd/internal/obj/arm64: new arm64 assembling path for SVE
This CL integrates a new assembling path specifically designed for SVE
and other modern ARM64 instructions, utilizing generated instruction
tables. It contains the foundational files and modifications to direct
the assembling pipeline to use this new data-driven path.
In a.out.go, it registers new constants for registers and operand types
used by SVE.
A new file inst.go is added, which defines the instruction table data
types and utility functions for the new path. The entry point from the
upstream pipeline is `tryEncode`.
`tryEncode` returns false upon an encoding failure, which allows the
upstream matching logic to handle multiple potential matches. The exact
match is not finalized until an instruction is actually encoded, as
detailed in the comments for `elemEncoders`.
This CL also introduces the core generated tables (`anames_gen.go`,
`encoding_gen.go`, `goops_gen.go`, and `inst_gen.go`) which handle a
wide variety of SVE instructions. A comprehensive end-to-end assembly
test file (`arm64sveenc.s`) is added, containing hundreds of test cases
for these SVE instructions to verify the new encoding path.
To facilitate these encodings, this CL implements handling for operand
types such as AC_ARNG, AC_PREG, AC_PREGZM, and AC_ZREG. Others are left
as TODOs.
The generated files in this CL are produced by the `instgen` tool in CL
755180.
Original author Eric Fang (eric.fang@arm.com, CL 424137)
Change-Id: I483f170c776fcd8edd8b8b04520f9d69ee0855dd
Reviewed-on: https://go-review.googlesource.com/c/go/+/742620
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/internal/pkgbits/pkgbits_test.go')
0 files changed, 0 insertions, 0 deletions
