Processor variables direct the Go compiler to use some processor instructions. The variable has an effect only when cross-compiling or re-compiling go locally. The intent is to ease the detection of processor characteristics and the set of the related processor variables.
Pseudo-file /proc/cpuinfo is parsed to load processor flags.
Reported flags are used to determine version of processor.
Pseudo-file is /proc/self/auxv is parsed to load machine features.
Win32 API call IsProcessorFeaturePresent is used to collect the features of the processor.
Several checks are available but not every instruction of each version.
Impact should be limited as the standard expects instructions to all be present for each version.
Level is set when all verifiable features are present.
Details are available in the structure ProcessorFeatures.
The availability of VFP defines level 6 or higher for GOARM. If v8 instruction set is available, GOARM is unset and GOARCH is set to ARM64.
Microarchitecture_levels Default for Go on amd64 is v1.
API is still evolving.
arm machine features are not used for now.