67
67
68
68
.altmacro
69
69
.macro lz4_decompress_asm_generic doprfm= 1
70
- LOCAL Lz4_decompress_begin , Decode_token , Get_literal_length
71
- LOCAL Copy_long_literal_hs_15 , Copy_long_literal_loop
72
- LOCAL Copy_literal_lt_15 , Decode_offset_matchlength
73
- LOCAL Get_long_matchlength , Copy_match_begin
74
- LOCAL Cond_offset_lt_matchlength , Copy_offset_lt_32
75
- LOCAL Copy_match_perm , Copy_offset_lt_32_loop
76
- LOCAL Cond_offset_ge_matchlength , Copy_offset_ge_match_loop
77
70
stp x29 , x30 , [ sp , # - 16 ] !
78
71
mov x29 , sp
79
72
stp x3 , x0 , [ sp , # - 16 ] ! / * push src and dst in stack * /
@@ -82,7 +75,7 @@ LOCAL Cond_offset_ge_matchlength, Copy_offset_ge_match_loop
82
75
adr permtable_addr , Permtable
83
76
adr cplen_table_addr , Copylength_table
84
77
85
- Lz4_decompress_begin:
78
+ Lz4_decompress_begin\@ :
86
79
/ *
87
80
* save current dst and src , ensure when return from asm routine
88
81
* current both of "dst" and "src" save good position.
@@ -96,12 +89,12 @@ Lz4_decompress_begin:
96
89
.if \doprfm
97
90
add tmp , x0 , # 512
98
91
cmp x2 , tmp
99
- b.ls Decode_token
92
+ b.ls Decode_token\@
100
93
prfm pstl2strm ,[ x0 , # 512 ]
101
94
.endif
102
95
103
96
/ * Decode Token Byte: * /
104
- Decode_token:
97
+ Decode_token\@ :
105
98
ldrb w_tmp , [ x3 ], # 1 / * read Token Byte * /
106
99
lsr literal_length , tmp , # 4 / * get literal_length * /
107
100
and tmp_match_length , tmp , # 0xf / * get match_length * /
@@ -112,44 +105,44 @@ Decode_token:
112
105
* or more bytes are liteal bytes.
113
106
* /
114
107
cmp literal_length , # 14
115
- b.ls Copy_literal_lt_15
108
+ b.ls Copy_literal_lt_15\@
116
109
117
110
/ *
118
111
* literal_length == 15 : more literal length bytes after TokenByte.
119
112
* continue decoding more literal length bytes.
120
113
* /
121
- Get_literal_length:
114
+ Get_literal_length\@ :
122
115
check_src_overflow
123
116
ldrb w_tmp , [ x3 ], # 1
124
117
add literal_length , literal_length , tmp
125
118
cmp tmp , # 255
126
- b.eq Get_literal_length
119
+ b.eq Get_literal_length\@
127
120
128
121
/ * literal copy * /
129
- Copy_long_literal_hs_15:
122
+ Copy_long_literal_hs_15\@ :
130
123
mov copy_from_ptr , x3
131
124
mov copy_to_ptr , x0
132
125
add x3 , x3 , literal_length
133
126
add x0 , x0 , literal_length
134
127
check_dst_overflow
135
128
check_src_overflow
136
129
137
- Copy_long_literal_loop:
130
+ Copy_long_literal_loop\@ :
138
131
ldr q0 , [ copy_from_ptr ], # 16
139
132
str q0 , [ copy_to_ptr ], # 16
140
133
141
134
cmp x0 , copy_to_ptr
142
- b.ls Decode_offset_matchlength
143
- b Copy_long_literal_loop
135
+ b.ls Decode_offset_matchlength\@
136
+ b Copy_long_literal_loop\@
144
137
145
- Copy_literal_lt_15:
138
+ Copy_literal_lt_15\@ :
146
139
ldr q0 , [ x3 ]
147
140
str q0 , [ x0 ]
148
141
add x3 , x3 , literal_length
149
142
add x0 , x0 , literal_length
150
143
151
144
/ * Decode offset and match_length * /
152
- Decode_offset_matchlength:
145
+ Decode_offset_matchlength\@ :
153
146
mov offset_src_ptr , x3
154
147
ldrh w_offset , [ x3 ], # 2 / * 2Byte:offset bytes * /
155
148
cbz offset , Failed / * match_length == 0 is invalid * /
@@ -162,68 +155,68 @@ Decode_offset_matchlength:
162
155
* /
163
156
add x0 , x0 , match_length
164
157
cmp match_length , # 19
165
- b.lo Copy_match_begin
158
+ b.lo Copy_match_begin\@
166
159
/ *
167
160
* continue decoding more match length bytes.
168
161
* /
169
- Get_long_matchlength:
162
+ Get_long_matchlength\@ :
170
163
check_src_overflow1
171
164
ldrb w_tmp , [ x3 ], # 1
172
165
add x0 , x0 , tmp
173
166
add match_length , match_length , tmp
174
167
cmp tmp , # 255
175
- b.eq Get_long_matchlength
168
+ b.eq Get_long_matchlength\@
176
169
177
170
/ *
178
171
* here got the matchlength , start "match copy" .
179
172
* /
180
- Copy_match_begin:
173
+ Copy_match_begin\@ :
181
174
check_dst_overflow1
182
175
cmp offset , match_length
183
- b.hs Cond_offset_ge_matchlength
176
+ b.hs Cond_offset_ge_matchlength\@
184
177
185
- Cond_offset_lt_matchlength:
178
+ Cond_offset_lt_matchlength\@ :
186
179
cmp offset , # 32
187
- b.hs Cond_offset_ge_matchlength
180
+ b.hs Cond_offset_ge_matchlength\@
188
181
189
- Copy_offset_lt_32:
182
+ Copy_offset_lt_32\@ :
190
183
ldr q1 , [ copy_from_ptr ]
191
184
add tmp , permtable_addr , offset , lsl # 5
192
185
ldp q2 , q3 , [ tmp ]
193
186
tbl v0.16b , {v1.16b} , v2.16b
194
187
tbl v1.16b , {v1.16b} , v3.16b
195
188
cmp offset , # 16
196
- b.lo Copy_match_perm
189
+ b.lo Copy_match_perm\@
197
190
ldp q0 , q1 , [ copy_from_ptr ]
198
- Copy_match_perm:
191
+ Copy_match_perm\@ :
199
192
ldrb w_tmp , [ cplen_table_addr , offset ]
200
193
stp q0 , q1 , [ copy_to_ptr ]
201
194
add copy_to_ptr , copy_to_ptr , tmp
202
195
cmp x0 , copy_to_ptr
203
- b.ls Lz4_decompress_begin
204
- Copy_offset_lt_32_loop:
196
+ b.ls Lz4_decompress_begin\@
197
+ Copy_offset_lt_32_loop\@ :
205
198
stp q0 , q1 , [ copy_to_ptr ]
206
199
add copy_to_ptr , copy_to_ptr , tmp
207
200
stp q0 , q1 , [ copy_to_ptr ]
208
201
add copy_to_ptr , copy_to_ptr , tmp
209
202
cmp x0 , copy_to_ptr
210
- b.hi Copy_offset_lt_32_loop
211
- b Lz4_decompress_begin
203
+ b.hi Copy_offset_lt_32_loop\@
204
+ b Lz4_decompress_begin\@
212
205
213
206
/ * offset >= match * /
214
- Cond_offset_ge_matchlength:
207
+ Cond_offset_ge_matchlength\@ :
215
208
ldr q0 , [ copy_from_ptr ], # 16
216
209
str q0 , [ copy_to_ptr ], # 16
217
210
218
211
cmp x0 , copy_to_ptr
219
- b.ls Lz4_decompress_begin
220
- Copy_offset_ge_match_loop:
212
+ b.ls Lz4_decompress_begin\@
213
+ Copy_offset_ge_match_loop\@ :
221
214
ldp q0 , q1 , [ copy_from_ptr ], # 32
222
215
stp q0 , q1 , [ copy_to_ptr ], # 32
223
216
224
217
cmp x0 , copy_to_ptr
225
- b.hi Copy_offset_ge_match_loop
226
- b Lz4_decompress_begin
218
+ b.hi Copy_offset_ge_match_loop\@
219
+ b Lz4_decompress_begin\@
227
220
.endm
228
221
229
222
.text
0 commit comments