Revisão | b56bd489812c685819bdec6d83f7990f21473be8 (tree) |
---|---|
Hora | 2019-05-13 16:11:01 |
Autor | Max Filippov <jcmvbkbc@gmai...> |
Commiter | Waldemar Brodkorb |
xtensa: don't use l32r opcode explicitly
xtensa assembler is capable of representing register loads with either
movi + addmi, l32r or const16, depending on the core configuration.
Don't use '.literal' and 'l32r' directly in the code, use 'movi' and let
the assembler relax them.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
@@ -37,11 +37,6 @@ | ||
37 | 37 | .text |
38 | 38 | .align 4 |
39 | 39 | .literal_position |
40 | - .literal .Lmask0, MASK0 | |
41 | - .literal .Lmask1, MASK1 | |
42 | - .literal .Lmask2, MASK2 | |
43 | - .literal .Lmask3, MASK3 | |
44 | - .literal .Lmask4, MASK4 | |
45 | 40 | ENTRY (strcmp) |
46 | 41 | /* a2 = s1, a3 = s2 */ |
47 | 42 |
@@ -130,10 +125,9 @@ ENTRY (strcmp) | ||
130 | 125 | .align 4 |
131 | 126 | #if XCHAL_HAVE_LOOPS |
132 | 127 | .Laligned: |
133 | - .begin no-transform | |
134 | 128 | movi a11, 0 |
135 | - l32r a4, .Lmask0 /* mask for byte 0 */ | |
136 | - l32r a7, .Lmask4 | |
129 | + movi a4, MASK0 /* mask for byte 0 */ | |
130 | + movi a7, MASK4 | |
137 | 131 | loop a11, .Laligned_done /* Loop forever. */ |
138 | 132 | |
139 | 133 | /* First unrolled loop body. */ |
@@ -184,10 +178,10 @@ ENTRY (strcmp) | ||
184 | 178 | If not, loop over the rest of string using normal algorithm. */ |
185 | 179 | |
186 | 180 | bnone a8, a4, .Leq /* if byte 0 is zero */ |
187 | - l32r a5, .Lmask1 /* mask for byte 1 */ | |
188 | - l32r a6, .Lmask2 /* mask for byte 2 */ | |
181 | + movi a5, MASK1 /* mask for byte 1 */ | |
182 | + movi a6, MASK2 /* mask for byte 2 */ | |
189 | 183 | bnone a8, a5, .Leq /* if byte 1 is zero */ |
190 | - l32r a7, .Lmask3 /* mask for byte 3 */ | |
184 | + movi a7, MASK3 /* mask for byte 3 */ | |
191 | 185 | bnone a8, a6, .Leq /* if byte 2 is zero */ |
192 | 186 | bnone a8, a7, .Leq /* if byte 3 is zero */ |
193 | 187 | addi.n a2, a2, 4 /* advance s1 pointer */ |
@@ -196,7 +190,6 @@ ENTRY (strcmp) | ||
196 | 190 | |
197 | 191 | /* align (1 mod 4) */ |
198 | 192 | loop a11, .Leq /* loop forever */ |
199 | - .end no-transform | |
200 | 193 | |
201 | 194 | l32i a8, a2, 0 /* get word from s1 */ |
202 | 195 | l32i a9, a3, 0 /* get word from s2 */ |