HomeFreeBSD

lang/go{-devel,118}: Add GOAMD64 knobs

Description

lang/go{-devel,118}: Add GOAMD64 knobs

Add amd64 microarchitecture level knobs for the Go compiler. Note that
this will affect only the compiler itself, port users will still need to
set GOAMD64 in the environment to adjust the microarchitecture of the
compiled code [1, 2].

Set default to the baseline level for the maximum backward
compatibility.

GOAMD64=v1 (default): The baseline. Exclusively generates instructions

that all 64-bit x86 processors can execute.

GOAMD64=v2: all v1 instructions, plus CMPXCHG16B, LAHF, SAHF, POPCNT,

SSE3, SSE4.1, SSE4.2, SSSE3.

GOAMD64=v3: all v2 instructions, plus AVX, AVX2, BMI1, BMI2, F16C, FMA,

LZCNT, MOVBE, OSXSAVE.

GOAMD64=v4: all v3 instructions, plus AVX512F, AVX512BW, AVX512CD,

AVX512DQ, AVX512VL.

[1] https://github.com/golang/go/wiki/MinimumRequirements#microarchitecture-support
[2] https://tip.golang.org/doc/go1.18#amd64

Details

Provenance
dmgkAuthored on Jul 8 2022, 7:38 PM
Parents
R11:9824453affa0: net/librespeed-go: update to 1.1.5
Branches
Unknown
Tags
Unknown