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.
5 // +build ignore_for_gccgo
6 // +build !386,!amd64,!amd64p32,!s390x,!arm,!arm64,!ppc64,!ppc64le,!mips,!mipsle,!wasm
10 import _
"unsafe" // for go:linkname
12 func Compare(a
, b
[]byte) int {
17 if l
== 0 ||
&a
[0] == &b
[0] {
20 for i
:= 0; i
< l
; i
++ {
39 //go:linkname bytes_Compare bytes.Compare
40 func bytes_Compare(a
, b
[]byte) int {
45 if l
== 0 ||
&a
[0] == &b
[0] {
48 for i
:= 0; i
< l
; i
++ {
67 //go:linkname runtime_cmpstring runtime.cmpstring
68 func runtime_cmpstring(a
, b
string) int {
73 for i
:= 0; i
< l
; i
++ {