Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1560)

Side by Side Diff: linux-aarch64/crypto/aes/aesv8-armx64.S

Issue 2569253003: BoringSSL: Roll generated files forward. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « err_data.c ('k') | linux-aarch64/crypto/modes/ghashv8-armx64.S » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #if defined(__aarch64__) 1 #if defined(__aarch64__)
2 #include <openssl/arm_arch.h> 2 #include <openssl/arm_arch.h>
3 3
4 #if __ARM_MAX_ARCH__>=7 4 #if __ARM_MAX_ARCH__>=7
5 .text 5 .text
6 #if !defined(__clang__) 6 #if !defined(__clang__) || defined(BORINGSSL_CLANG_SUPPORTS_DOT_ARCH)
7 .arch armv8-a+crypto 7 .arch armv8-a+crypto
8 #endif 8 #endif
9 .align 5 9 .align 5
10 .Lrcon: 10 .Lrcon:
11 .long 0x01,0x01,0x01,0x01 11 .long 0x01,0x01,0x01,0x01
12 .long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d // rotate-n-splat 12 .long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d // rotate-n-splat
13 .long 0x1b,0x1b,0x1b,0x1b 13 .long 0x1b,0x1b,0x1b,0x1b
14 14
15 .globl» aes_v8_set_encrypt_key 15 .globl» aes_hw_set_encrypt_key
16 .hidden»aes_v8_set_encrypt_key 16 .hidden»aes_hw_set_encrypt_key
17 .type» aes_v8_set_encrypt_key,%function 17 .type» aes_hw_set_encrypt_key,%function
18 .align 5 18 .align 5
19 aes_v8_set_encrypt_key: 19 aes_hw_set_encrypt_key:
20 .Lenc_key: 20 .Lenc_key:
21 stp x29,x30,[sp,#-16]! 21 stp x29,x30,[sp,#-16]!
22 add x29,sp,#0 22 add x29,sp,#0
23 mov x3,#-1 23 mov x3,#-1
24 cmp x0,#0 24 cmp x0,#0
25 b.eq .Lenc_key_abort 25 b.eq .Lenc_key_abort
26 cmp x2,#0 26 cmp x2,#0
27 b.eq .Lenc_key_abort 27 b.eq .Lenc_key_abort
28 mov x3,#-2 28 mov x3,#-2
29 cmp w1,#128 29 cmp w1,#128
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 b .Loop256 171 b .Loop256
172 172
173 .Ldone: 173 .Ldone:
174 str w12,[x2] 174 str w12,[x2]
175 mov x3,#0 175 mov x3,#0
176 176
177 .Lenc_key_abort: 177 .Lenc_key_abort:
178 mov x0,x3 // return value 178 mov x0,x3 // return value
179 ldr x29,[sp],#16 179 ldr x29,[sp],#16
180 ret 180 ret
181 .size» aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key 181 .size» aes_hw_set_encrypt_key,.-aes_hw_set_encrypt_key
182 182
183 .globl» aes_v8_set_decrypt_key 183 .globl» aes_hw_set_decrypt_key
184 .hidden»aes_v8_set_decrypt_key 184 .hidden»aes_hw_set_decrypt_key
185 .type» aes_v8_set_decrypt_key,%function 185 .type» aes_hw_set_decrypt_key,%function
186 .align 5 186 .align 5
187 aes_v8_set_decrypt_key: 187 aes_hw_set_decrypt_key:
188 stp x29,x30,[sp,#-16]! 188 stp x29,x30,[sp,#-16]!
189 add x29,sp,#0 189 add x29,sp,#0
190 bl .Lenc_key 190 bl .Lenc_key
191 191
192 cmp x0,#0 192 cmp x0,#0
193 b.ne .Ldec_key_abort 193 b.ne .Ldec_key_abort
194 194
195 sub x2,x2,#240 // restore original x2 195 sub x2,x2,#240 // restore original x2
196 mov x4,#-16 196 mov x4,#-16
197 add x0,x2,x12,lsl#4 // end of key schedule 197 add x0,x2,x12,lsl#4 // end of key schedule
(...skipping 14 matching lines...) Expand all
212 b.hi .Loop_imc 212 b.hi .Loop_imc
213 213
214 ld1 {v0.4s},[x2] 214 ld1 {v0.4s},[x2]
215 aesimc v0.16b,v0.16b 215 aesimc v0.16b,v0.16b
216 st1 {v0.4s},[x0] 216 st1 {v0.4s},[x0]
217 217
218 eor x0,x0,x0 // return value 218 eor x0,x0,x0 // return value
219 .Ldec_key_abort: 219 .Ldec_key_abort:
220 ldp x29,x30,[sp],#16 220 ldp x29,x30,[sp],#16
221 ret 221 ret
222 .size» aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key 222 .size» aes_hw_set_decrypt_key,.-aes_hw_set_decrypt_key
223 .globl» aes_v8_encrypt 223 .globl» aes_hw_encrypt
224 .hidden»aes_v8_encrypt 224 .hidden»aes_hw_encrypt
225 .type» aes_v8_encrypt,%function 225 .type» aes_hw_encrypt,%function
226 .align 5 226 .align 5
227 aes_v8_encrypt: 227 aes_hw_encrypt:
228 ldr w3,[x2,#240] 228 ldr w3,[x2,#240]
229 ld1 {v0.4s},[x2],#16 229 ld1 {v0.4s},[x2],#16
230 ld1 {v2.16b},[x0] 230 ld1 {v2.16b},[x0]
231 sub w3,w3,#2 231 sub w3,w3,#2
232 ld1 {v1.4s},[x2],#16 232 ld1 {v1.4s},[x2],#16
233 233
234 .Loop_enc: 234 .Loop_enc:
235 aese v2.16b,v0.16b 235 aese v2.16b,v0.16b
236 aesmc v2.16b,v2.16b 236 aesmc v2.16b,v2.16b
237 ld1 {v0.4s},[x2],#16 237 ld1 {v0.4s},[x2],#16
238 subs w3,w3,#2 238 subs w3,w3,#2
239 aese v2.16b,v1.16b 239 aese v2.16b,v1.16b
240 aesmc v2.16b,v2.16b 240 aesmc v2.16b,v2.16b
241 ld1 {v1.4s},[x2],#16 241 ld1 {v1.4s},[x2],#16
242 b.gt .Loop_enc 242 b.gt .Loop_enc
243 243
244 aese v2.16b,v0.16b 244 aese v2.16b,v0.16b
245 aesmc v2.16b,v2.16b 245 aesmc v2.16b,v2.16b
246 ld1 {v0.4s},[x2] 246 ld1 {v0.4s},[x2]
247 aese v2.16b,v1.16b 247 aese v2.16b,v1.16b
248 eor v2.16b,v2.16b,v0.16b 248 eor v2.16b,v2.16b,v0.16b
249 249
250 st1 {v2.16b},[x1] 250 st1 {v2.16b},[x1]
251 ret 251 ret
252 .size» aes_v8_encrypt,.-aes_v8_encrypt 252 .size» aes_hw_encrypt,.-aes_hw_encrypt
253 .globl» aes_v8_decrypt 253 .globl» aes_hw_decrypt
254 .hidden»aes_v8_decrypt 254 .hidden»aes_hw_decrypt
255 .type» aes_v8_decrypt,%function 255 .type» aes_hw_decrypt,%function
256 .align 5 256 .align 5
257 aes_v8_decrypt: 257 aes_hw_decrypt:
258 ldr w3,[x2,#240] 258 ldr w3,[x2,#240]
259 ld1 {v0.4s},[x2],#16 259 ld1 {v0.4s},[x2],#16
260 ld1 {v2.16b},[x0] 260 ld1 {v2.16b},[x0]
261 sub w3,w3,#2 261 sub w3,w3,#2
262 ld1 {v1.4s},[x2],#16 262 ld1 {v1.4s},[x2],#16
263 263
264 .Loop_dec: 264 .Loop_dec:
265 aesd v2.16b,v0.16b 265 aesd v2.16b,v0.16b
266 aesimc v2.16b,v2.16b 266 aesimc v2.16b,v2.16b
267 ld1 {v0.4s},[x2],#16 267 ld1 {v0.4s},[x2],#16
268 subs w3,w3,#2 268 subs w3,w3,#2
269 aesd v2.16b,v1.16b 269 aesd v2.16b,v1.16b
270 aesimc v2.16b,v2.16b 270 aesimc v2.16b,v2.16b
271 ld1 {v1.4s},[x2],#16 271 ld1 {v1.4s},[x2],#16
272 b.gt .Loop_dec 272 b.gt .Loop_dec
273 273
274 aesd v2.16b,v0.16b 274 aesd v2.16b,v0.16b
275 aesimc v2.16b,v2.16b 275 aesimc v2.16b,v2.16b
276 ld1 {v0.4s},[x2] 276 ld1 {v0.4s},[x2]
277 aesd v2.16b,v1.16b 277 aesd v2.16b,v1.16b
278 eor v2.16b,v2.16b,v0.16b 278 eor v2.16b,v2.16b,v0.16b
279 279
280 st1 {v2.16b},[x1] 280 st1 {v2.16b},[x1]
281 ret 281 ret
282 .size» aes_v8_decrypt,.-aes_v8_decrypt 282 .size» aes_hw_decrypt,.-aes_hw_decrypt
283 .globl» aes_v8_cbc_encrypt 283 .globl» aes_hw_cbc_encrypt
284 .hidden»aes_v8_cbc_encrypt 284 .hidden»aes_hw_cbc_encrypt
285 .type» aes_v8_cbc_encrypt,%function 285 .type» aes_hw_cbc_encrypt,%function
286 .align 5 286 .align 5
287 aes_v8_cbc_encrypt: 287 aes_hw_cbc_encrypt:
288 stp x29,x30,[sp,#-16]! 288 stp x29,x30,[sp,#-16]!
289 add x29,sp,#0 289 add x29,sp,#0
290 subs x2,x2,#16 290 subs x2,x2,#16
291 mov x8,#16 291 mov x8,#16
292 b.lo .Lcbc_abort 292 b.lo .Lcbc_abort
293 csel x8,xzr,x8,eq 293 csel x8,xzr,x8,eq
294 294
295 cmp w5,#0 // en- or decrypting? 295 cmp w5,#0 // en- or decrypting?
296 ldr w5,[x3,#240] 296 ldr w5,[x3,#240]
297 and x2,x2,#-16 297 and x2,x2,#-16
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 .Lcbc_dec_one: 563 .Lcbc_dec_one:
564 eor v5.16b,v5.16b,v18.16b 564 eor v5.16b,v5.16b,v18.16b
565 orr v6.16b,v19.16b,v19.16b 565 orr v6.16b,v19.16b,v19.16b
566 st1 {v5.16b},[x1],#16 566 st1 {v5.16b},[x1],#16
567 567
568 .Lcbc_done: 568 .Lcbc_done:
569 st1 {v6.16b},[x4] 569 st1 {v6.16b},[x4]
570 .Lcbc_abort: 570 .Lcbc_abort:
571 ldr x29,[sp],#16 571 ldr x29,[sp],#16
572 ret 572 ret
573 .size» aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt 573 .size» aes_hw_cbc_encrypt,.-aes_hw_cbc_encrypt
574 .globl» aes_v8_ctr32_encrypt_blocks 574 .globl» aes_hw_ctr32_encrypt_blocks
575 .hidden»aes_v8_ctr32_encrypt_blocks 575 .hidden»aes_hw_ctr32_encrypt_blocks
576 .type» aes_v8_ctr32_encrypt_blocks,%function 576 .type» aes_hw_ctr32_encrypt_blocks,%function
577 .align 5 577 .align 5
578 aes_v8_ctr32_encrypt_blocks: 578 aes_hw_ctr32_encrypt_blocks:
579 stp x29,x30,[sp,#-16]! 579 stp x29,x30,[sp,#-16]!
580 add x29,sp,#0 580 add x29,sp,#0
581 ldr w5,[x3,#240] 581 ldr w5,[x3,#240]
582 582
583 ldr w8, [x4, #12] 583 ldr w8, [x4, #12]
584 ld1 {v0.4s},[x4] 584 ld1 {v0.4s},[x4]
585 585
586 ld1 {v16.4s,v17.4s},[x3] // load key schedule... 586 ld1 {v16.4s,v17.4s},[x3] // load key schedule...
587 sub w5,w5,#4 587 sub w5,w5,#4
588 mov x12,#16 588 mov x12,#16
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 cmp x2,#1 745 cmp x2,#1
746 eor v2.16b,v2.16b,v0.16b 746 eor v2.16b,v2.16b,v0.16b
747 eor v3.16b,v3.16b,v1.16b 747 eor v3.16b,v3.16b,v1.16b
748 st1 {v2.16b},[x1],#16 748 st1 {v2.16b},[x1],#16
749 b.eq .Lctr32_done 749 b.eq .Lctr32_done
750 st1 {v3.16b},[x1] 750 st1 {v3.16b},[x1]
751 751
752 .Lctr32_done: 752 .Lctr32_done:
753 ldr x29,[sp],#16 753 ldr x29,[sp],#16
754 ret 754 ret
755 .size» aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks 755 .size» aes_hw_ctr32_encrypt_blocks,.-aes_hw_ctr32_encrypt_blocks
756 #endif 756 #endif
757 #endif 757 #endif
OLDNEW
« no previous file with comments | « err_data.c ('k') | linux-aarch64/crypto/modes/ghashv8-armx64.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698