OLD | NEW |
1 #if defined(__arm__) | 1 #if defined(__arm__) |
| 2 @ Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved. |
| 3 @ |
| 4 @ Licensed under the OpenSSL license (the "License"). You may not use |
| 5 @ this file except in compliance with the License. You can obtain a copy |
| 6 @ in the file LICENSE in the source distribution or at |
| 7 @ https://www.openssl.org/source/license.html |
| 8 |
2 | 9 |
3 @ ==================================================================== | 10 @ ==================================================================== |
4 @ Written by Andy Polyakov <appro@openssl.org> for the OpenSSL | 11 @ Written by Andy Polyakov <appro@openssl.org> for the OpenSSL |
5 @ project. The module is, however, dual licensed under OpenSSL and | 12 @ project. The module is, however, dual licensed under OpenSSL and |
6 @ CRYPTOGAMS licenses depending on where you obtain it. For further | 13 @ CRYPTOGAMS licenses depending on where you obtain it. For further |
7 @ details see http://www.openssl.org/~appro/cryptogams/. | 14 @ details see http://www.openssl.org/~appro/cryptogams/. |
8 @ | 15 @ |
9 @ Specific modes and adaptation for Linux kernel by Ard Biesheuvel | 16 @ Specific modes and adaptation for Linux kernel by Ard Biesheuvel |
10 @ <ard.biesheuvel@linaro.org>. Permission to use under GPL terms is | 17 @ <ard.biesheuvel@linaro.org>. Permission to use under GPL terms is |
11 @ granted. | 18 @ granted. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #if __ARM_MAX_ARCH__>=7 | 77 #if __ARM_MAX_ARCH__>=7 |
71 .arch armv7-a | 78 .arch armv7-a |
72 .fpu neon | 79 .fpu neon |
73 | 80 |
74 .text | 81 .text |
75 .syntax unified @ ARMv7-capable assembler is expected to handle this | 82 .syntax unified @ ARMv7-capable assembler is expected to handle this |
76 #if defined(__thumb2__) && !defined(__APPLE__) | 83 #if defined(__thumb2__) && !defined(__APPLE__) |
77 .thumb | 84 .thumb |
78 #else | 85 #else |
79 .code 32 | 86 .code 32 |
| 87 # undef __thumb2__ |
80 #endif | 88 #endif |
81 | 89 |
82 .type _bsaes_decrypt8,%function | 90 .type _bsaes_decrypt8,%function |
83 .align 4 | 91 .align 4 |
84 _bsaes_decrypt8: | 92 _bsaes_decrypt8: |
85 adr r6,_bsaes_decrypt8 | 93 adr r6,_bsaes_decrypt8 |
86 vldmia r4!, {q9} @ round 0 key | 94 vldmia r4!, {q9} @ round 0 key |
87 #ifdef __APPLE__ | 95 #ifdef __APPLE__ |
88 adr r6,.LM0ISR | 96 adr r6,.LM0ISR |
89 #else | 97 #else |
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1306 b .Lcbc_dec_done | 1314 b .Lcbc_dec_done |
1307 .align 4 | 1315 .align 4 |
1308 .Lcbc_dec_one: | 1316 .Lcbc_dec_one: |
1309 sub r0, r0, #0x10 | 1317 sub r0, r0, #0x10 |
1310 mov r10, r1 @ save original out pointer | 1318 mov r10, r1 @ save original out pointer |
1311 mov r1, r9 @ use the iv scratch space as out buffer | 1319 mov r1, r9 @ use the iv scratch space as out buffer |
1312 mov r2, r3 | 1320 mov r2, r3 |
1313 vmov q4,q15 @ just in case ensure that IV | 1321 vmov q4,q15 @ just in case ensure that IV |
1314 vmov q5,q0 @ and input are preserved | 1322 vmov q5,q0 @ and input are preserved |
1315 bl AES_decrypt | 1323 bl AES_decrypt |
1316 » vld1.8» {q0}, [r9,:64]» » @ load result | 1324 » vld1.8» {q0}, [r9]» » @ load result |
1317 veor q0, q0, q4 @ ^= IV | 1325 veor q0, q0, q4 @ ^= IV |
1318 vmov q15, q5 @ q5 holds input | 1326 vmov q15, q5 @ q5 holds input |
1319 vst1.8 {q0}, [r10] @ write output | 1327 vst1.8 {q0}, [r10] @ write output |
1320 | 1328 |
1321 .Lcbc_dec_done: | 1329 .Lcbc_dec_done: |
1322 #ifndef BSAES_ASM_EXTENDED_KEY | 1330 #ifndef BSAES_ASM_EXTENDED_KEY |
1323 vmov.i32 q0, #0 | 1331 vmov.i32 q0, #0 |
1324 vmov.i32 q1, #0 | 1332 vmov.i32 q1, #0 |
1325 .Lcbc_dec_bzero:@ wipe key schedule [if any] | 1333 .Lcbc_dec_bzero:@ wipe key schedule [if any] |
1326 vstmia sp!, {q0,q1} | 1334 vstmia sp!, {q0,q1} |
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2550 mov sp, r3 | 2558 mov sp, r3 |
2551 #ifdef XTS_CHAIN_TWEAK | 2559 #ifdef XTS_CHAIN_TWEAK |
2552 vst1.8 {q8}, [r1] | 2560 vst1.8 {q8}, [r1] |
2553 #endif | 2561 #endif |
2554 VFP_ABI_POP | 2562 VFP_ABI_POP |
2555 ldmia sp!, {r4,r5,r6,r7,r8,r9,r10, pc} @ return | 2563 ldmia sp!, {r4,r5,r6,r7,r8,r9,r10, pc} @ return |
2556 | 2564 |
2557 .size bsaes_xts_decrypt,.-bsaes_xts_decrypt | 2565 .size bsaes_xts_decrypt,.-bsaes_xts_decrypt |
2558 #endif | 2566 #endif |
2559 #endif | 2567 #endif |
OLD | NEW |