github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/src/pkg/bytes/asm_386.s (about)

     1  // Copyright 2009 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  TEXT ·IndexByte(SB),7,$0
     6  	MOVL	s+0(FP), SI
     7  	MOVL	s_len+4(FP), CX
     8  	MOVB	c+12(FP), AL
     9  	MOVL	SI, DI
    10  	CLD; REPN; SCASB
    11  	JZ 3(PC)
    12  	MOVL	$-1, ret+16(FP)
    13  	RET
    14  	SUBL	SI, DI
    15  	SUBL	$1, DI
    16  	MOVL	DI, ret+16(FP)
    17  	RET