LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2014 The Go Authors. All rights reserved. | 1 // Copyright 2014 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // +build !plan9 | 5 // +build !plan9 |
6 | 6 |
7 #include "../../cmd/ld/textflag.h" | 7 #include "textflag.h" |
8 | 8 |
9 // void runtime·memclr(void*, uintptr) | 9 // void runtime·memclr(void*, uintptr) |
10 TEXT runtime·memclr(SB), NOSPLIT, $0-8 | 10 TEXT runtime·memclr(SB), NOSPLIT, $0-8 |
11 MOVL ptr+0(FP), DI | 11 MOVL ptr+0(FP), DI |
12 MOVL n+4(FP), BX | 12 MOVL n+4(FP), BX |
13 XORL AX, AX | 13 XORL AX, AX |
14 | 14 |
15 // MOVOU seems always faster than REP STOSL. | 15 // MOVOU seems always faster than REP STOSL. |
16 clr_tail: | 16 clr_tail: |
17 TESTL BX, BX | 17 TESTL BX, BX |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 MOVOU X0, -16(DI)(BX*1) | 119 MOVOU X0, -16(DI)(BX*1) |
120 RET | 120 RET |
121 nosse2: | 121 nosse2: |
122 MOVL BX, CX | 122 MOVL BX, CX |
123 SHRL $2, CX | 123 SHRL $2, CX |
124 REP | 124 REP |
125 STOSL | 125 STOSL |
126 ANDL $3, BX | 126 ANDL $3, BX |
127 JNE clr_tail | 127 JNE clr_tail |
128 RET | 128 RET |
LEFT | RIGHT |