File tree 2 files changed +20
-16
lines changed
2 files changed +20
-16
lines changed Original file line number Diff line number Diff line change 6
6
#include "textflag.h"
7
7
8
8
// func memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr)
9
- TEXT runtime·memclrNoHeapPointers(SB),NOSPLIT,$0 -16
10
- MOVV ptr+0 (FP), R6
11
- MOVV n+8 (FP), R7
12
- ADDV R6, R7, R4
9
+ TEXT runtime·memclrNoHeapPointers<ABIInternal> (SB),NOSPLIT,$0 -16
10
+ #ifndef GOEXPERIMENT_regabiargs
11
+ MOVV ptr+0 (FP), R4
12
+ MOVV n+8 (FP), R5
13
+ #endif
14
+ ADDV R4, R5, R6
13
15
14
16
// if less than 8 bytes, do one byte at a time
15
- SGTU $8 , R7 , R8
17
+ SGTU $8 , R5 , R8
16
18
BNE R8, out
17
19
18
20
// do one byte at a time until 8-aligned
19
- AND $7 , R6 , R8
21
+ AND $7 , R4 , R8
20
22
BEQ R8, words
21
- MOVB R0, (R6 )
22
- ADDV $1 , R6
23
+ MOVB R0, (R4 )
24
+ ADDV $1 , R4
23
25
JMP -4 (PC)
24
26
25
27
words:
26
28
// do 8 bytes at a time if there is room
27
- ADDV $-7 , R4, R7
29
+ ADDV $-7 , R6, R5
28
30
29
31
PCALIGN $16
30
- SGTU R7, R6 , R8
32
+ SGTU R5, R4 , R8
31
33
BEQ R8, out
32
- MOVV R0, (R6 )
33
- ADDV $8 , R6
34
+ MOVV R0, (R4 )
35
+ ADDV $8 , R4
34
36
JMP -4 (PC)
35
37
36
38
out:
37
- BEQ R6, R4 , done
38
- MOVB R0, (R6 )
39
- ADDV $1 , R6
39
+ BEQ R4, R6 , done
40
+ MOVB R0, (R4 )
41
+ ADDV $1 , R4
40
42
JMP -3 (PC)
41
43
done:
42
44
RET
Original file line number Diff line number Diff line change 7
7
// See memmove Go doc for important implementation constraints.
8
8
9
9
// func memmove(to , from unsafe.Pointer , n uintptr)
10
- TEXT runtime·memmove(SB) , NOSPLIT|NOFRAME , $ 0 - 24
10
+ TEXT runtime·memmove<ABIInternal>(SB) , NOSPLIT|NOFRAME , $ 0 - 24
11
+ #ifndef GOEXPERIMENT_regabiargs
11
12
MOVV to + 0 (FP) , R4
12
13
MOVV from + 8 (FP) , R5
13
14
MOVV n + 16 (FP) , R6
15
+ #endif
14
16
BNE R6 , check
15
17
RET
16
18
You can’t perform that action at this time.
0 commit comments