github.com/twelsh-aw/go/src@v0.0.0-20230516233729-a56fe86a7c81/runtime/asm_amd64.h (about) 1 // Copyright 2021 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Define features that are guaranteed to be supported by setting the AMD64 variable. 6 // If a feature is supported, there's no need to check it at runtime every time. 7 8 #ifdef GOAMD64_v2 9 #define hasPOPCNT 10 #define hasSSE42 11 #endif 12 13 #ifdef GOAMD64_v3 14 #define hasAVX 15 #define hasAVX2 16 #define hasPOPCNT 17 #define hasSSE42 18 #endif 19 20 #ifdef GOAMD64_v4 21 #define hasAVX 22 #define hasAVX2 23 #define hasPOPCNT 24 #define hasSSE42 25 #endif