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

Side by Side Diff: third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S

Issue 2219933002: Land BoringSSL roll on master (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months 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
OLDNEW
1 #if defined(__arm__) 1 #if defined(__arm__)
2 #include "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 .arch armv7-a 6 .arch armv7-a
7 .fpu neon 7 .fpu neon
8 .code 32 8 .code 32
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_v8_set_encrypt_key
16 .hidden aes_v8_set_encrypt_key
16 .type aes_v8_set_encrypt_key,%function 17 .type aes_v8_set_encrypt_key,%function
17 .align 5 18 .align 5
18 aes_v8_set_encrypt_key: 19 aes_v8_set_encrypt_key:
19 .Lenc_key: 20 .Lenc_key:
20 mov r3,#-1 21 mov r3,#-1
21 cmp r0,#0 22 cmp r0,#0
22 beq .Lenc_key_abort 23 beq .Lenc_key_abort
23 cmp r2,#0 24 cmp r2,#0
24 beq .Lenc_key_abort 25 beq .Lenc_key_abort
25 mov r3,#-2 26 mov r3,#-2
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 str r12,[r2] 177 str r12,[r2]
177 mov r3,#0 178 mov r3,#0
178 179
179 .Lenc_key_abort: 180 .Lenc_key_abort:
180 mov r0,r3 @ return value 181 mov r0,r3 @ return value
181 182
182 bx lr 183 bx lr
183 .size aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key 184 .size aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key
184 185
185 .globl aes_v8_set_decrypt_key 186 .globl aes_v8_set_decrypt_key
187 .hidden aes_v8_set_decrypt_key
186 .type aes_v8_set_decrypt_key,%function 188 .type aes_v8_set_decrypt_key,%function
187 .align 5 189 .align 5
188 aes_v8_set_decrypt_key: 190 aes_v8_set_decrypt_key:
189 stmdb sp!,{r4,lr} 191 stmdb sp!,{r4,lr}
190 bl .Lenc_key 192 bl .Lenc_key
191 193
192 cmp r0,#0 194 cmp r0,#0
193 bne .Ldec_key_abort 195 bne .Ldec_key_abort
194 196
195 sub r2,r2,#240 @ restore original r2 197 sub r2,r2,#240 @ restore original r2
(...skipping 17 matching lines...) Expand all
213 215
214 vld1.32 {q0},[r2] 216 vld1.32 {q0},[r2]
215 .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0 217 .byte 0xc0,0x03,0xb0,0xf3 @ aesimc q0,q0
216 vst1.32 {q0},[r0] 218 vst1.32 {q0},[r0]
217 219
218 eor r0,r0,r0 @ return value 220 eor r0,r0,r0 @ return value
219 .Ldec_key_abort: 221 .Ldec_key_abort:
220 ldmia sp!,{r4,pc} 222 ldmia sp!,{r4,pc}
221 .size aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key 223 .size aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key
222 .globl aes_v8_encrypt 224 .globl aes_v8_encrypt
225 .hidden aes_v8_encrypt
223 .type aes_v8_encrypt,%function 226 .type aes_v8_encrypt,%function
224 .align 5 227 .align 5
225 aes_v8_encrypt: 228 aes_v8_encrypt:
226 ldr r3,[r2,#240] 229 ldr r3,[r2,#240]
227 vld1.32 {q0},[r2]! 230 vld1.32 {q0},[r2]!
228 vld1.8 {q2},[r0] 231 vld1.8 {q2},[r0]
229 sub r3,r3,#2 232 sub r3,r3,#2
230 vld1.32 {q1},[r2]! 233 vld1.32 {q1},[r2]!
231 234
232 .Loop_enc: 235 .Loop_enc:
233 .byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0 236 .byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0
234 .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 237 .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2
235 vld1.32 {q0},[r2]! 238 vld1.32 {q0},[r2]!
236 subs r3,r3,#2 239 subs r3,r3,#2
237 .byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1 240 .byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1
238 .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 241 .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2
239 vld1.32 {q1},[r2]! 242 vld1.32 {q1},[r2]!
240 bgt .Loop_enc 243 bgt .Loop_enc
241 244
242 .byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0 245 .byte 0x00,0x43,0xb0,0xf3 @ aese q2,q0
243 .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2 246 .byte 0x84,0x43,0xb0,0xf3 @ aesmc q2,q2
244 vld1.32 {q0},[r2] 247 vld1.32 {q0},[r2]
245 .byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1 248 .byte 0x02,0x43,0xb0,0xf3 @ aese q2,q1
246 veor q2,q2,q0 249 veor q2,q2,q0
247 250
248 vst1.8 {q2},[r1] 251 vst1.8 {q2},[r1]
249 bx lr 252 bx lr
250 .size aes_v8_encrypt,.-aes_v8_encrypt 253 .size aes_v8_encrypt,.-aes_v8_encrypt
251 .globl aes_v8_decrypt 254 .globl aes_v8_decrypt
255 .hidden aes_v8_decrypt
252 .type aes_v8_decrypt,%function 256 .type aes_v8_decrypt,%function
253 .align 5 257 .align 5
254 aes_v8_decrypt: 258 aes_v8_decrypt:
255 ldr r3,[r2,#240] 259 ldr r3,[r2,#240]
256 vld1.32 {q0},[r2]! 260 vld1.32 {q0},[r2]!
257 vld1.8 {q2},[r0] 261 vld1.8 {q2},[r0]
258 sub r3,r3,#2 262 sub r3,r3,#2
259 vld1.32 {q1},[r2]! 263 vld1.32 {q1},[r2]!
260 264
261 .Loop_dec: 265 .Loop_dec:
262 .byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0 266 .byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0
263 .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 267 .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2
264 vld1.32 {q0},[r2]! 268 vld1.32 {q0},[r2]!
265 subs r3,r3,#2 269 subs r3,r3,#2
266 .byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1 270 .byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1
267 .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 271 .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2
268 vld1.32 {q1},[r2]! 272 vld1.32 {q1},[r2]!
269 bgt .Loop_dec 273 bgt .Loop_dec
270 274
271 .byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0 275 .byte 0x40,0x43,0xb0,0xf3 @ aesd q2,q0
272 .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2 276 .byte 0xc4,0x43,0xb0,0xf3 @ aesimc q2,q2
273 vld1.32 {q0},[r2] 277 vld1.32 {q0},[r2]
274 .byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1 278 .byte 0x42,0x43,0xb0,0xf3 @ aesd q2,q1
275 veor q2,q2,q0 279 veor q2,q2,q0
276 280
277 vst1.8 {q2},[r1] 281 vst1.8 {q2},[r1]
278 bx lr 282 bx lr
279 .size aes_v8_decrypt,.-aes_v8_decrypt 283 .size aes_v8_decrypt,.-aes_v8_decrypt
280 .globl aes_v8_cbc_encrypt 284 .globl aes_v8_cbc_encrypt
285 .hidden aes_v8_cbc_encrypt
281 .type aes_v8_cbc_encrypt,%function 286 .type aes_v8_cbc_encrypt,%function
282 .align 5 287 .align 5
283 aes_v8_cbc_encrypt: 288 aes_v8_cbc_encrypt:
284 mov ip,sp 289 mov ip,sp
285 stmdb sp!,{r4,r5,r6,r7,r8,lr} 290 stmdb sp!,{r4,r5,r6,r7,r8,lr}
286 vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI specificati on says so 291 vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI specificati on says so
287 ldmia ip,{r4,r5} @ load remaining args 292 ldmia ip,{r4,r5} @ load remaining args
288 subs r2,r2,#16 293 subs r2,r2,#16
289 mov r8,#16 294 mov r8,#16
290 blo .Lcbc_abort 295 blo .Lcbc_abort
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 vorr q6,q11,q11 568 vorr q6,q11,q11
564 vst1.8 {q5},[r1]! 569 vst1.8 {q5},[r1]!
565 570
566 .Lcbc_done: 571 .Lcbc_done:
567 vst1.8 {q6},[r4] 572 vst1.8 {q6},[r4]
568 .Lcbc_abort: 573 .Lcbc_abort:
569 vldmia sp!,{d8,d9,d10,d11,d12,d13,d14,d15} 574 vldmia sp!,{d8,d9,d10,d11,d12,d13,d14,d15}
570 ldmia sp!,{r4,r5,r6,r7,r8,pc} 575 ldmia sp!,{r4,r5,r6,r7,r8,pc}
571 .size aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt 576 .size aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt
572 .globl aes_v8_ctr32_encrypt_blocks 577 .globl aes_v8_ctr32_encrypt_blocks
578 .hidden aes_v8_ctr32_encrypt_blocks
573 .type aes_v8_ctr32_encrypt_blocks,%function 579 .type aes_v8_ctr32_encrypt_blocks,%function
574 .align 5 580 .align 5
575 aes_v8_ctr32_encrypt_blocks: 581 aes_v8_ctr32_encrypt_blocks:
576 mov ip,sp 582 mov ip,sp
577 stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,lr} 583 stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,lr}
578 vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI specificati on says so 584 vstmdb sp!,{d8,d9,d10,d11,d12,d13,d14,d15} @ ABI specificati on says so
579 ldr r4, [ip] @ load remaining arg 585 ldr r4, [ip] @ load remaining arg
580 ldr r5,[r3,#240] 586 ldr r5,[r3,#240]
581 587
582 ldr r8, [r4, #12] 588 ldr r8, [r4, #12]
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 veor q3,q3,q1 752 veor q3,q3,q1
747 vst1.8 {q2},[r1]! 753 vst1.8 {q2},[r1]!
748 beq .Lctr32_done 754 beq .Lctr32_done
749 vst1.8 {q3},[r1] 755 vst1.8 {q3},[r1]
750 756
751 .Lctr32_done: 757 .Lctr32_done:
752 vldmia sp!,{d8,d9,d10,d11,d12,d13,d14,d15} 758 vldmia sp!,{d8,d9,d10,d11,d12,d13,d14,d15}
753 ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,pc} 759 ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,pc}
754 .size aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks 760 .size aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks
755 #endif 761 #endif
756 #endif 762 #endif
OLDNEW
« no previous file with comments | « third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S ('k') | third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698