github.com/twelsh-aw/go/src@v0.0.0-20230516233729-a56fe86a7c81/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 // See memclrNoHeapPointers Go doc for important implementation constraints. 8 9 // func memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr) 10 TEXT runtime·memclrNoHeapPointers(SB),NOSPLIT,$0-16 11 MOVQ ptr+0(FP), DI 12 MOVQ n+8(FP), CX 13 MOVQ CX, BX 14 ANDQ $7, BX 15 SHRQ $3, CX 16 MOVQ $0, AX 17 CLD 18 REP 19 STOSQ 20 MOVQ BX, CX 21 REP 22 STOSB 23 RET