-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathasm_amd64.go
More file actions
221 lines (190 loc) · 8.19 KB
/
Copy pathasm_amd64.go
File metadata and controls
221 lines (190 loc) · 8.19 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
// Code generated by command: go run gen.go -out ../asm_amd64.s -stubs ../asm_amd64.go -pkg=minlz. DO NOT EDIT.
//go:build !appengine && !noasm && gc && !purego
package minlz
// encodeBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 8388608 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBlockAsm(dst []byte, src []byte, tmp *[131072]byte) int
// encodeBlockAsm2MB encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 2097152 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBlockAsm2MB(dst []byte, src []byte, tmp *[131072]byte) int
// encodeBlockAsm512K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 524288 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBlockAsm512K(dst []byte, src []byte, tmp *[65536]byte) int
// encodeBlockAsm64K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 65536 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBlockAsm64K(dst []byte, src []byte, tmp *[16384]byte) int
// encodeBlockAsm16K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 16384 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBlockAsm16K(dst []byte, src []byte, tmp *[8192]byte) int
// encodeBlockAsm4K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 4096 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBlockAsm4K(dst []byte, src []byte, tmp *[2048]byte) int
// encodeBlockAsm1K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 1024 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBlockAsm1K(dst []byte, src []byte, tmp *[1024]byte) int
// encodeFastBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 8388608 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeFastBlockAsm(dst []byte, src []byte, tmp *[65536]byte) int
// encodeFastBlockAsm2MB encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 2097152 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeFastBlockAsm2MB(dst []byte, src []byte, tmp *[32768]byte) int
// encodeFastBlockAsm512K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 524288 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeFastBlockAsm512K(dst []byte, src []byte, tmp *[32768]byte) int
// encodeFastBlockAsm64K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 65536 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeFastBlockAsm64K(dst []byte, src []byte, tmp *[8192]byte) int
// encodeFastBlockAsm16K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 16384 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeFastBlockAsm16K(dst []byte, src []byte, tmp *[4096]byte) int
// encodeFastBlockAsm4K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 4096 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeFastBlockAsm4K(dst []byte, src []byte, tmp *[2048]byte) int
// encodeFastBlockAsm1K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 1024 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeFastBlockAsm1K(dst []byte, src []byte, tmp *[1024]byte) int
// encodeBetterBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 8388608 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBetterBlockAsm(dst []byte, src []byte, tmp *[589824]byte) int
// encodeBetterBlockAsm2MB encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 2097152 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBetterBlockAsm2MB(dst []byte, src []byte, tmp *[589824]byte) int
// encodeBetterBlockAsm512K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 524288 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBetterBlockAsm512K(dst []byte, src []byte, tmp *[294912]byte) int
// encodeBetterBlockAsm64K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 65536 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBetterBlockAsm64K(dst []byte, src []byte, tmp *[73728]byte) int
// encodeBetterBlockAsm16K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 16384 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBetterBlockAsm16K(dst []byte, src []byte, tmp *[36864]byte) int
// encodeBetterBlockAsm4K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 4096 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBetterBlockAsm4K(dst []byte, src []byte, tmp *[10240]byte) int
// encodeBetterBlockAsm1K encodes a non-empty src to a guaranteed-large-enough dst.
// Maximum input 1024 bytes.
// It assumes that the varint-encoded length of the decompressed bytes has already been written.
//
//go:noescape
func encodeBetterBlockAsm1K(dst []byte, src []byte, tmp *[4608]byte) int
// emitLiteral writes a literal chunk and returns the number of bytes written.
//
// It assumes that:
//
// dst is long enough to hold the encoded bytes with margin of 8 bytes
// 0 <= len(lit) && len(lit) <= math.MaxUint32
//
//go:noescape
func emitLiteral(dst []byte, lit []byte) int
// emitRepeat writes a repeat chunk and returns the number of bytes written.
// Length must be at least 4 and < 1<<32
//
//go:noescape
func emitRepeat(dst []byte, length int) int
// emitCopy writes a copy chunk and returns the number of bytes written.
//
// It assumes that:
//
// dst is long enough to hold the encoded bytes
// 1 <= offset && offset <= math.MaxUint32
// 4 <= length && length <= 1 << 24
//
//go:noescape
func emitCopy(dst []byte, offset int, length int) int
// emitCopyLits2 writes a copy chunk and returns the number of bytes written.
//
// It assumes that:
//
// dst is long enough to hold the encoded bytes
// 1 <= offset && offset <= 65536
// 4 <= length && length <= MaxBlockSize
//
//go:noescape
func emitCopyLits2(dst []byte, lits []byte, offset int, length int) int
// emitCopyLits3 writes a copy chunk and returns the number of bytes written.
//
// It assumes that:
//
// dst is long enough to hold the encoded bytes
// 1 <= offset && offset <= (1<<21)
// 4 <= length && length <= MaxBlockSize
//
//go:noescape
func emitCopyLits3(dst []byte, lits []byte, offset int, length int) int
// matchLen returns how many bytes match in a and b
//
// It assumes that:
//
// len(a) <= len(b)
//
//go:noescape
func matchLen(a []byte, b []byte) int
// cvtLZ4Block converts an LZ4 block to MinLZ
//
//go:noescape
func cvtLZ4BlockAsm(dst []byte, src []byte) (uncompressed int, dstUsed int)
// decodeBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
// It assumes that the varint-encoded length of the decompressed bytes has already been read.
//
//go:noescape
func decodeBlockAsm(dst []byte, src []byte) int