// Support cpu feature variables are used in code generated by the compiler
// to guard execution of instructions that can not be assumed to be always supported.
- x86HasPOPCNT = cpu.X86.HasPOPCNT
- x86HasSSE41 = cpu.X86.HasSSE41
- x86HasFMA = cpu.X86.HasFMA
+ switch GOARCH {
+ case "386", "AMD64":
+ x86HasPOPCNT = cpu.X86.HasPOPCNT
+ x86HasSSE41 = cpu.X86.HasSSE41
+ x86HasFMA = cpu.X86.HasFMA
- armHasVFPv4 = cpu.ARM.HasVFPv4
+ case "arm":
+ armHasVFPv4 = cpu.ARM.HasVFPv4
- arm64HasATOMICS = cpu.ARM64.HasATOMICS
+ case "arm64":
+ arm64HasATOMICS = cpu.ARM64.HasATOMICS
+ }
}
// The bootstrap sequence is: