diff --git a/GoArm.md b/GoArm.md index ac7518e5..cdc56771 100644 --- a/GoArm.md +++ b/GoArm.md @@ -17,6 +17,7 @@ Go supports the following ARM architectural families. | ARMv6 | supported | GOARM=6 | GOARCH=arm | | ARMv7 | supported | GOARM=7 | GOARCH=arm | | ARMv8 | supported | n/a | GOARCH=arm64 | +| ARMv9 | supported | n/a | GOARCH=arm64 | Starting from Go 1.1, the appropriate GOARM value will be chosen if you compile the program from source on the target machine. In cross compilation situations, it is recommended that you always set an appropriate GOARM value along with GOARCH. diff --git a/MinimumRequirements.md b/MinimumRequirements.md index 76680913..d9db90ea 100644 --- a/MinimumRequirements.md +++ b/MinimumRequirements.md @@ -115,7 +115,15 @@ See https://go.dev/doc/install/source#environment ### arm64 -All ARMv8-A processors. +Until Go 1.23, the Go compiler always generated ARM64 binaries that could be executed by any ARMv8-A processor. + +Go 1.23 introduced a new `GOARM64` environment variable, which specifies the minimum target version of the ARM64 architecture at compile time. Allowed values are `v8.{0-9}` and `v9.{0-5}`. This may be followed by an option specifying extensions implemented by target hardware. Valid options are `,lse` and `,crypto`. + +Setting, for example, `GOARM64=v8.0,lse`, will allow the Go compiler to use LSE instructions in the generated binaries (which may improve performance in some cases); but these binaries will not run on older ARM64 processors that don’t support LSE. + +The Go toolchain may also generate newer instructions, but guarded by dynamic checks to ensure they’re only executed on capable processors. + +The `GOARM64` environment variable defaults to `v8.0`. ### ppc64 (big endian)