github.com/JimmyHuang454/JLS-go@v0.0.0-20230831150107-90d536585ba0/internal/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  //go:build 386 || amd64 || s390x || arm || arm64 || loong64 || ppc64 || ppc64le || mips || mipsle || wasm || mips64 || mips64le || riscv64
     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