github.com/guyezi/gofrontend@v0.0.0-20200228202240-7a62a49e62c0/libgo/go/internal/bytealg/bytealg.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  // +build ignore_for_gccgo
     6  
     7  package bytealg
     8  
     9  import (
    10  	"internal/cpu"
    11  	"unsafe"
    12  )
    13  
    14  // Offsets into internal/cpu records for use in assembly.
    15  const (
    16  	offsetX86HasSSE2   = unsafe.Offsetof(cpu.X86.HasSSE2)
    17  	offsetX86HasSSE42  = unsafe.Offsetof(cpu.X86.HasSSE42)
    18  	offsetX86HasAVX2   = unsafe.Offsetof(cpu.X86.HasAVX2)
    19  	offsetX86HasPOPCNT = unsafe.Offsetof(cpu.X86.HasPOPCNT)
    20  
    21  	offsetS390xHasVX = unsafe.Offsetof(cpu.S390X.HasVX)
    22  )
    23  
    24  // MaxLen is the maximum length of the string to be searched for (argument b) in Index.
    25  var MaxLen int = 32