github.com/panjjo/go@v0.0.0-20161104043856-d62b31386338/src/runtime/memclr_plan9_amd64.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·memclrNoHeapPointers(void*, uintptr) 8 TEXT runtime·memclrNoHeapPointers(SB),NOSPLIT,$0-16 9 MOVQ ptr+0(FP), DI 10 MOVQ n+8(FP), CX 11 MOVQ CX, BX 12 ANDQ $7, BX 13 SHRQ $3, CX 14 MOVQ $0, AX 15 CLD 16 REP 17 STOSQ 18 MOVQ BX, CX 19 REP 20 STOSB 21 RET