| OLD | NEW |
| 1 #if defined(__arm__) | 1 #if defined(__arm__) |
| 2 | 2 |
| 3 @ ==================================================================== | 3 @ ==================================================================== |
| 4 @ Written by Andy Polyakov <appro@openssl.org> for the OpenSSL | 4 @ Written by Andy Polyakov <appro@openssl.org> for the OpenSSL |
| 5 @ project. The module is, however, dual licensed under OpenSSL and | 5 @ project. The module is, however, dual licensed under OpenSSL and |
| 6 @ CRYPTOGAMS licenses depending on where you obtain it. For further | 6 @ CRYPTOGAMS licenses depending on where you obtain it. For further |
| 7 @ details see http://www.openssl.org/~appro/cryptogams/. | 7 @ details see http://www.openssl.org/~appro/cryptogams/. |
| 8 @ | 8 @ |
| 9 @ Permission to use under GPL terms is granted. | 9 @ Permission to use under GPL terms is granted. |
| 10 @ ==================================================================== | 10 @ ==================================================================== |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 @ byte in 12.5 cycles or 23% faster than integer-only code. Snapdragon | 31 @ byte in 12.5 cycles or 23% faster than integer-only code. Snapdragon |
| 32 @ S4 does it in 12.5 cycles too, but it's 50% faster than integer-only | 32 @ S4 does it in 12.5 cycles too, but it's 50% faster than integer-only |
| 33 @ code (meaning that latter performs sub-optimally, nothing was done | 33 @ code (meaning that latter performs sub-optimally, nothing was done |
| 34 @ about it). | 34 @ about it). |
| 35 | 35 |
| 36 @ May 2014. | 36 @ May 2014. |
| 37 @ | 37 @ |
| 38 @ Add ARMv8 code path performing at 2.0 cpb on Apple A7. | 38 @ Add ARMv8 code path performing at 2.0 cpb on Apple A7. |
| 39 | 39 |
| 40 #ifndef __KERNEL__ | 40 #ifndef __KERNEL__ |
| 41 # include "arm_arch.h" | 41 # include <openssl/arm_arch.h> |
| 42 #else | 42 #else |
| 43 # define __ARM_ARCH__ __LINUX_ARM_ARCH__ | 43 # define __ARM_ARCH__ __LINUX_ARM_ARCH__ |
| 44 # define __ARM_MAX_ARCH__ 7 | 44 # define __ARM_MAX_ARCH__ 7 |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 .text | 47 .text |
| 48 #if __ARM_ARCH__<7 | 48 #if __ARM_ARCH__<7 |
| 49 .code 32 | 49 .code 32 |
| 50 #else | 50 #else |
| 51 .syntax unified | 51 .syntax unified |
| (...skipping 26 matching lines...) Expand all Loading... |
| 78 .word 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 | 78 .word 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 |
| 79 .size K256,.-K256 | 79 .size K256,.-K256 |
| 80 .word 0 @ terminator | 80 .word 0 @ terminator |
| 81 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) | 81 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) |
| 82 .LOPENSSL_armcap: | 82 .LOPENSSL_armcap: |
| 83 .word OPENSSL_armcap_P-.Lsha256_block_data_order | 83 .word OPENSSL_armcap_P-.Lsha256_block_data_order |
| 84 #endif | 84 #endif |
| 85 .align 5 | 85 .align 5 |
| 86 | 86 |
| 87 .globl sha256_block_data_order | 87 .globl sha256_block_data_order |
| 88 .hidden sha256_block_data_order |
| 88 .type sha256_block_data_order,%function | 89 .type sha256_block_data_order,%function |
| 89 sha256_block_data_order: | 90 sha256_block_data_order: |
| 90 .Lsha256_block_data_order: | 91 .Lsha256_block_data_order: |
| 91 #if __ARM_ARCH__<7 | 92 #if __ARM_ARCH__<7 |
| 92 sub r3,pc,#8 @ sha256_block_data_order | 93 sub r3,pc,#8 @ sha256_block_data_order |
| 93 #else | 94 #else |
| 94 adr r3,sha256_block_data_order | 95 adr r3,sha256_block_data_order |
| 95 #endif | 96 #endif |
| 96 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) | 97 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) |
| 97 ldr r12,.LOPENSSL_armcap | 98 ldr r12,.LOPENSSL_armcap |
| (...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1868 tst lr,#1 | 1869 tst lr,#1 |
| 1869 moveq pc,lr @ be binary compatible with V4, yet | 1870 moveq pc,lr @ be binary compatible with V4, yet |
| 1870 .word 0xe12fff1e @ interoperable with Thumb ISA:-) | 1871 .word 0xe12fff1e @ interoperable with Thumb ISA:-) |
| 1871 #endif | 1872 #endif |
| 1872 .size sha256_block_data_order,.-sha256_block_data_order | 1873 .size sha256_block_data_order,.-sha256_block_data_order |
| 1873 #if __ARM_MAX_ARCH__>=7 | 1874 #if __ARM_MAX_ARCH__>=7 |
| 1874 .arch armv7-a | 1875 .arch armv7-a |
| 1875 .fpu neon | 1876 .fpu neon |
| 1876 | 1877 |
| 1877 .globl sha256_block_data_order_neon | 1878 .globl sha256_block_data_order_neon |
| 1879 .hidden sha256_block_data_order_neon |
| 1878 .type sha256_block_data_order_neon,%function | 1880 .type sha256_block_data_order_neon,%function |
| 1879 .align 4 | 1881 .align 4 |
| 1880 sha256_block_data_order_neon: | 1882 sha256_block_data_order_neon: |
| 1881 .LNEON: | 1883 .LNEON: |
| 1882 stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} | 1884 stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr} |
| 1883 | 1885 |
| 1884 sub r11,sp,#16*4+16 | 1886 sub r11,sp,#16*4+16 |
| 1885 adrl r14,K256 | 1887 adrl r14,K256 |
| 1886 bic r11,r11,#15 @ align for 128-bit stores | 1888 bic r11,r11,#15 @ align for 128-bit stores |
| 1887 mov r12,sp | 1889 mov r12,sp |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2808 bx lr @ bx lr | 2810 bx lr @ bx lr |
| 2809 .size sha256_block_data_order_armv8,.-sha256_block_data_order_armv8 | 2811 .size sha256_block_data_order_armv8,.-sha256_block_data_order_armv8 |
| 2810 #endif | 2812 #endif |
| 2811 .byte 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114
,109,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,47,65,82,77,118,56,44,32,6
7,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,1
10,115,115,108,46,111,114,103,62,0 | 2813 .byte 83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114
,109,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,47,65,82,77,118,56,44,32,6
7,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,1
10,115,115,108,46,111,114,103,62,0 |
| 2812 .align 2 | 2814 .align 2 |
| 2813 .align 2 | 2815 .align 2 |
| 2814 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) | 2816 #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) |
| 2815 .comm OPENSSL_armcap_P,4,4 | 2817 .comm OPENSSL_armcap_P,4,4 |
| 2816 .hidden OPENSSL_armcap_P | 2818 .hidden OPENSSL_armcap_P |
| 2817 #endif | 2819 #endif |
| 2818 #endif | 2820 #endif |
| OLD | NEW |