github.com/SandwichDev/go-internals@v0.0.0-20210605002614-12311ac6b2c5/bytealg/compare_native.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 386 amd64 s390x arm arm64 ppc64 ppc64le mips mipsle wasm mips64 mips64le
     6  
     7  package bytealg
     8  
     9  import _ "unsafe" // For go:linkname
    10  
    11  //go:noescape
    12  func Compare(a, b []byte) int
    13  
    14  // The declaration below generates ABI wrappers for functions
    15  // implemented in assembly in this package but declared in another
    16  // package.
    17  
    18  //go:linkname abigen_runtime_cmpstring runtime.cmpstring
    19  func abigen_runtime_cmpstring(a, b string) int