-
Notifications
You must be signed in to change notification settings - Fork 7
/
find_whitespace_and_structurals_amd64.s
82 lines (73 loc) · 3.8 KB
/
find_whitespace_and_structurals_amd64.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//+build !noasm !appengine
// AUTO-GENERATED BY C2GOASM -- DO NOT EDIT
DATA LCDATA1<>+0x000(SB)/8, $0x0000000000000010
DATA LCDATA1<>+0x008(SB)/8, $0x00000902010c0800
DATA LCDATA1<>+0x010(SB)/8, $0x0000000000000010
DATA LCDATA1<>+0x018(SB)/8, $0x00000902010c0800
DATA LCDATA1<>+0x020(SB)/8, $0x7f7f7f7f7f7f7f7f
DATA LCDATA1<>+0x028(SB)/8, $0x7f7f7f7f7f7f7f7f
DATA LCDATA1<>+0x030(SB)/8, $0x7f7f7f7f7f7f7f7f
DATA LCDATA1<>+0x038(SB)/8, $0x7f7f7f7f7f7f7f7f
DATA LCDATA1<>+0x040(SB)/8, $0x0100010004120008
DATA LCDATA1<>+0x048(SB)/8, $0x0000010203000000
DATA LCDATA1<>+0x050(SB)/8, $0x0100010004120008
DATA LCDATA1<>+0x058(SB)/8, $0x0000010203000000
DATA LCDATA1<>+0x060(SB)/8, $0x0707070707070707
DATA LCDATA1<>+0x068(SB)/8, $0x0707070707070707
DATA LCDATA1<>+0x070(SB)/8, $0x0707070707070707
DATA LCDATA1<>+0x078(SB)/8, $0x0707070707070707
DATA LCDATA1<>+0x080(SB)/8, $0x1818181818181818
DATA LCDATA1<>+0x088(SB)/8, $0x1818181818181818
DATA LCDATA1<>+0x090(SB)/8, $0x1818181818181818
DATA LCDATA1<>+0x098(SB)/8, $0x1818181818181818
GLOBL LCDATA1<>(SB), 8, $160
TEXT ·_find_whitespace_and_structurals(SB), $0-24
MOVQ input+0(FP), DI
MOVQ whitespace+8(FP), DX
MOVQ structurals+16(FP), CX
VMOVDQU (DI), Y8 // load low 32-bytes
VMOVDQU 0x20(DI), Y9 // load high 32-bytes
CALL ·__find_whitespace_and_structurals(SB)
VZEROUPPER
RET
TEXT ·__find_whitespace_and_structurals(SB), $0
LEAQ LCDATA1<>(SB), BP
VMOVDQA Y8, Y0 // vmovdqu ymm0, yword [rdi]
VMOVDQA Y9, Y1 // vmovdqu ymm1, yword [rsi]
VMOVDQA (BP), Y2 // vmovdqa ymm2, yword 0[rbp] /* [rip + LCPI0_0] */
VPSHUFB Y0, Y2, Y3 // vpshufb ymm3, ymm2, ymm0
VPSRLD $4, Y0, Y0 // vpsrld ymm0, ymm0, 4
VMOVDQA 32(BP), Y4 // vmovdqa ymm4, yword 32[rbp] /* [rip + LCPI0_1] */
VPAND Y4, Y0, Y0 // vpand ymm0, ymm0, ymm4
VMOVDQA 64(BP), Y5 // vmovdqa ymm5, yword 64[rbp] /* [rip + LCPI0_2] */
VPSHUFB Y0, Y5, Y0 // vpshufb ymm0, ymm5, ymm0
VPAND Y3, Y0, Y0 // vpand ymm0, ymm0, ymm3
VPSHUFB Y1, Y2, Y2 // vpshufb ymm2, ymm2, ymm1
VPSRLD $4, Y1, Y1 // vpsrld ymm1, ymm1, 4
VPAND Y4, Y1, Y1 // vpand ymm1, ymm1, ymm4
VPSHUFB Y1, Y5, Y1 // vpshufb ymm1, ymm5, ymm1
VPAND Y2, Y1, Y1 // vpand ymm1, ymm1, ymm2
VMOVDQA 96(BP), Y2 // vmovdqa ymm2, yword 96[rbp] /* [rip + LCPI0_3] */
VPAND Y2, Y0, Y3 // vpand ymm3, ymm0, ymm2
VPXOR Y4, Y4, Y4 // vpxor ymm4, ymm4, ymm4
VPCMPEQB Y4, Y3, Y3 // vpcmpeqb ymm3, ymm3, ymm4
VPAND Y2, Y1, Y2 // vpand ymm2, ymm1, ymm2
VPCMPEQB Y4, Y2, Y2 // vpcmpeqb ymm2, ymm2, ymm4
VPMOVMSKB Y3, AX // vpmovmskb eax, ymm3
VPMOVMSKB Y2, SI // vpmovmskb esi, ymm2
SHLQ $32, SI // shl rsi, 32
ORQ AX, SI // or rsi, rax
NOTQ SI // not rsi
MOVQ SI, (CX) // mov qword [rcx], rsi
VMOVDQA 128(BP), Y2 // vmovdqa ymm2, yword 128[rbp] /* [rip + LCPI0_4] */
VPAND Y2, Y0, Y0 // vpand ymm0, ymm0, ymm2
VPCMPEQB Y4, Y0, Y0 // vpcmpeqb ymm0, ymm0, ymm4
VPAND Y2, Y1, Y1 // vpand ymm1, ymm1, ymm2
VPCMPEQB Y4, Y1, Y1 // vpcmpeqb ymm1, ymm1, ymm4
VPMOVMSKB Y0, AX // vpmovmskb eax, ymm0
VPMOVMSKB Y1, CX // vpmovmskb ecx, ymm1
SHLQ $32, CX // shl rcx, 32
ORQ AX, CX // or rcx, rax
NOTQ CX // not rcx
MOVQ CX, (DX) // mov qword [rdx], rcx
RET