Text file src/runtime/asm_amd64.h

     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 hasAVX512F
    24  #define hasAVX512BW
    25  #define hasAVX512VL
    26  #define hasPOPCNT
    27  #define hasSSE42
    28  #endif
    29  

View as plain text