Skip to content

Commit 0b47deb

Browse files
luk1337engstk
authored andcommitted
erofs: lz4armv8: Make it compile with IAS
`LOCAL` is not supported by llvm-as. Change-Id: Id2b4541ecad77fd3287a7c115982f41f0b32a9f3 Signed-off-by: engstk <[email protected]>
1 parent e8bf574 commit 0b47deb

File tree

1 file changed

+31
-38
lines changed

1 file changed

+31
-38
lines changed

fs/erofs/lz4armv8/lz4armv8.S

Lines changed: 31 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,6 @@
6767

6868
.altmacro
6969
.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
7770
stp x29, x30, [sp, #-16]!
7871
mov x29, sp
7972
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
8275
adr permtable_addr, Permtable
8376
adr cplen_table_addr, Copylength_table
8477

85-
Lz4_decompress_begin:
78+
Lz4_decompress_begin\@:
8679
/*
8780
* save current dst and src ,ensure when return from asm routine
8881
* current both of "dst" and "src" save good position.
@@ -96,12 +89,12 @@ Lz4_decompress_begin:
9689
.if \doprfm
9790
add tmp, x0, #512
9891
cmp x2, tmp
99-
b.ls Decode_token
92+
b.ls Decode_token\@
10093
prfm pstl2strm,[x0,#512]
10194
.endif
10295

10396
/* Decode Token Byte: */
104-
Decode_token:
97+
Decode_token\@:
10598
ldrb w_tmp, [x3], #1 /* read Token Byte */
10699
lsr literal_length, tmp, #4 /* get literal_length */
107100
and tmp_match_length, tmp, #0xf /* get match_length */
@@ -112,44 +105,44 @@ Decode_token:
112105
* or more bytes are liteal bytes.
113106
*/
114107
cmp literal_length, #14
115-
b.ls Copy_literal_lt_15
108+
b.ls Copy_literal_lt_15\@
116109

117110
/*
118111
* literal_length == 15 : more literal length bytes after TokenByte.
119112
* continue decoding more literal length bytes.
120113
*/
121-
Get_literal_length:
114+
Get_literal_length\@:
122115
check_src_overflow
123116
ldrb w_tmp, [x3], #1
124117
add literal_length, literal_length, tmp
125118
cmp tmp, #255
126-
b.eq Get_literal_length
119+
b.eq Get_literal_length\@
127120

128121
/* literal copy */
129-
Copy_long_literal_hs_15:
122+
Copy_long_literal_hs_15\@:
130123
mov copy_from_ptr, x3
131124
mov copy_to_ptr, x0
132125
add x3, x3, literal_length
133126
add x0, x0, literal_length
134127
check_dst_overflow
135128
check_src_overflow
136129

137-
Copy_long_literal_loop:
130+
Copy_long_literal_loop\@:
138131
ldr q0, [copy_from_ptr], #16
139132
str q0, [copy_to_ptr], #16
140133

141134
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\@
144137

145-
Copy_literal_lt_15:
138+
Copy_literal_lt_15\@:
146139
ldr q0, [x3]
147140
str q0, [x0]
148141
add x3, x3, literal_length
149142
add x0, x0, literal_length
150143

151144
/* Decode offset and match_length */
152-
Decode_offset_matchlength:
145+
Decode_offset_matchlength\@:
153146
mov offset_src_ptr, x3
154147
ldrh w_offset, [x3], #2 /* 2Byte:offset bytes */
155148
cbz offset, Failed /* match_length == 0 is invalid */
@@ -162,68 +155,68 @@ Decode_offset_matchlength:
162155
*/
163156
add x0, x0, match_length
164157
cmp match_length, #19
165-
b.lo Copy_match_begin
158+
b.lo Copy_match_begin\@
166159
/*
167160
* continue decoding more match length bytes.
168161
*/
169-
Get_long_matchlength:
162+
Get_long_matchlength\@:
170163
check_src_overflow1
171164
ldrb w_tmp, [x3], #1
172165
add x0, x0, tmp
173166
add match_length, match_length, tmp
174167
cmp tmp, #255
175-
b.eq Get_long_matchlength
168+
b.eq Get_long_matchlength\@
176169

177170
/*
178171
* here got the matchlength,start "match copy".
179172
*/
180-
Copy_match_begin:
173+
Copy_match_begin\@:
181174
check_dst_overflow1
182175
cmp offset , match_length
183-
b.hs Cond_offset_ge_matchlength
176+
b.hs Cond_offset_ge_matchlength\@
184177

185-
Cond_offset_lt_matchlength:
178+
Cond_offset_lt_matchlength\@:
186179
cmp offset , #32
187-
b.hs Cond_offset_ge_matchlength
180+
b.hs Cond_offset_ge_matchlength\@
188181

189-
Copy_offset_lt_32:
182+
Copy_offset_lt_32\@:
190183
ldr q1, [copy_from_ptr]
191184
add tmp, permtable_addr, offset, lsl #5
192185
ldp q2, q3, [tmp]
193186
tbl v0.16b, {v1.16b}, v2.16b
194187
tbl v1.16b, {v1.16b}, v3.16b
195188
cmp offset , #16
196-
b.lo Copy_match_perm
189+
b.lo Copy_match_perm\@
197190
ldp q0, q1, [copy_from_ptr]
198-
Copy_match_perm:
191+
Copy_match_perm\@:
199192
ldrb w_tmp, [cplen_table_addr, offset]
200193
stp q0, q1, [copy_to_ptr]
201194
add copy_to_ptr, copy_to_ptr, tmp
202195
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\@:
205198
stp q0, q1, [copy_to_ptr]
206199
add copy_to_ptr, copy_to_ptr, tmp
207200
stp q0, q1, [copy_to_ptr]
208201
add copy_to_ptr, copy_to_ptr, tmp
209202
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\@
212205

213206
/* offset >= match */
214-
Cond_offset_ge_matchlength:
207+
Cond_offset_ge_matchlength\@:
215208
ldr q0, [copy_from_ptr], #16
216209
str q0, [copy_to_ptr], #16
217210

218211
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\@:
221214
ldp q0, q1, [copy_from_ptr], #32
222215
stp q0, q1, [copy_to_ptr], #32
223216

224217
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\@
227220
.endm
228221

229222
.text

0 commit comments

Comments
 (0)