rsc.io/go@v0.0.0-20150416155037-e040fd465409/src/runtime/memclr_arm64.s (about)

     1  // Copyright 2014 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  #include "textflag.h"
     6  
     7  // void runtime·memclr(void*, uintptr)
     8  TEXT runtime·memclr(SB),NOSPLIT,$0-16
     9  	MOVD	ptr+0(FP), R3
    10  	MOVD	n+8(FP), R4
    11  	CMP	$0, R4
    12  	BEQ	done
    13  	ADD	R3, R4, R4
    14  	MOVBU.P	$0, 1(R3)
    15  	CMP	R3, R4
    16  	BNE	-2(PC)
    17  done:
    18  	RET