github.com/mdaxf/iac@v0.0.0-20240519030858-58a061660378/vendor_skip/golang.org/x/sys/cpu/cpu_arm.go (about)

     1  // Copyright 2018 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  package cpu
     6  
     7  const cacheLineSize = 32
     8  
     9  // HWCAP/HWCAP2 bits.
    10  // These are specific to Linux.
    11  const (
    12  	hwcap_SWP       = 1 << 0
    13  	hwcap_HALF      = 1 << 1
    14  	hwcap_THUMB     = 1 << 2
    15  	hwcap_26BIT     = 1 << 3
    16  	hwcap_FAST_MULT = 1 << 4
    17  	hwcap_FPA       = 1 << 5
    18  	hwcap_VFP       = 1 << 6
    19  	hwcap_EDSP      = 1 << 7
    20  	hwcap_JAVA      = 1 << 8
    21  	hwcap_IWMMXT    = 1 << 9
    22  	hwcap_CRUNCH    = 1 << 10
    23  	hwcap_THUMBEE   = 1 << 11
    24  	hwcap_NEON      = 1 << 12
    25  	hwcap_VFPv3     = 1 << 13
    26  	hwcap_VFPv3D16  = 1 << 14
    27  	hwcap_TLS       = 1 << 15
    28  	hwcap_VFPv4     = 1 << 16
    29  	hwcap_IDIVA     = 1 << 17
    30  	hwcap_IDIVT     = 1 << 18
    31  	hwcap_VFPD32    = 1 << 19
    32  	hwcap_LPAE      = 1 << 20
    33  	hwcap_EVTSTRM   = 1 << 21
    34  
    35  	hwcap2_AES   = 1 << 0
    36  	hwcap2_PMULL = 1 << 1
    37  	hwcap2_SHA1  = 1 << 2
    38  	hwcap2_SHA2  = 1 << 3
    39  	hwcap2_CRC32 = 1 << 4
    40  )
    41  
    42  func initOptions() {
    43  	options = []option{
    44  		{Name: "pmull", Feature: &ARM.HasPMULL},
    45  		{Name: "sha1", Feature: &ARM.HasSHA1},
    46  		{Name: "sha2", Feature: &ARM.HasSHA2},
    47  		{Name: "swp", Feature: &ARM.HasSWP},
    48  		{Name: "thumb", Feature: &ARM.HasTHUMB},
    49  		{Name: "thumbee", Feature: &ARM.HasTHUMBEE},
    50  		{Name: "tls", Feature: &ARM.HasTLS},
    51  		{Name: "vfp", Feature: &ARM.HasVFP},
    52  		{Name: "vfpd32", Feature: &ARM.HasVFPD32},
    53  		{Name: "vfpv3", Feature: &ARM.HasVFPv3},
    54  		{Name: "vfpv3d16", Feature: &ARM.HasVFPv3D16},
    55  		{Name: "vfpv4", Feature: &ARM.HasVFPv4},
    56  		{Name: "half", Feature: &ARM.HasHALF},
    57  		{Name: "26bit", Feature: &ARM.Has26BIT},
    58  		{Name: "fastmul", Feature: &ARM.HasFASTMUL},
    59  		{Name: "fpa", Feature: &ARM.HasFPA},
    60  		{Name: "edsp", Feature: &ARM.HasEDSP},
    61  		{Name: "java", Feature: &ARM.HasJAVA},
    62  		{Name: "iwmmxt", Feature: &ARM.HasIWMMXT},
    63  		{Name: "crunch", Feature: &ARM.HasCRUNCH},
    64  		{Name: "neon", Feature: &ARM.HasNEON},
    65  		{Name: "idivt", Feature: &ARM.HasIDIVT},
    66  		{Name: "idiva", Feature: &ARM.HasIDIVA},
    67  		{Name: "lpae", Feature: &ARM.HasLPAE},
    68  		{Name: "evtstrm", Feature: &ARM.HasEVTSTRM},
    69  		{Name: "aes", Feature: &ARM.HasAES},
    70  		{Name: "crc32", Feature: &ARM.HasCRC32},
    71  	}
    72  
    73  }