1/* Do not modify. This file is auto-generated from arm64cpuid.pl. */ 2#include "arm_arch.h" 3 4.text 5.arch armv8-a+crypto 6 7.align 5 8.globl _armv7_neon_probe 9.type _armv7_neon_probe,%function 10_armv7_neon_probe: 11 orr v15.16b, v15.16b, v15.16b 12 ret 13.size _armv7_neon_probe,.-_armv7_neon_probe 14 15.globl _armv7_tick 16.type _armv7_tick,%function 17_armv7_tick: 18#ifdef __APPLE__ 19 mrs x0, CNTPCT_EL0 20#else 21 mrs x0, CNTVCT_EL0 22#endif 23 ret 24.size _armv7_tick,.-_armv7_tick 25 26.globl _armv8_aes_probe 27.type _armv8_aes_probe,%function 28_armv8_aes_probe: 29 aese v0.16b, v0.16b 30 ret 31.size _armv8_aes_probe,.-_armv8_aes_probe 32 33.globl _armv8_sha1_probe 34.type _armv8_sha1_probe,%function 35_armv8_sha1_probe: 36 sha1h s0, s0 37 ret 38.size _armv8_sha1_probe,.-_armv8_sha1_probe 39 40.globl _armv8_sha256_probe 41.type _armv8_sha256_probe,%function 42_armv8_sha256_probe: 43 sha256su0 v0.4s, v0.4s 44 ret 45.size _armv8_sha256_probe,.-_armv8_sha256_probe 46 47.globl _armv8_pmull_probe 48.type _armv8_pmull_probe,%function 49_armv8_pmull_probe: 50 pmull v0.1q, v0.1d, v0.1d 51 ret 52.size _armv8_pmull_probe,.-_armv8_pmull_probe 53 54.globl _armv8_sha512_probe 55.type _armv8_sha512_probe,%function 56_armv8_sha512_probe: 57.long 0xcec08000 // sha512su0 v0.2d,v0.2d 58 ret 59.size _armv8_sha512_probe,.-_armv8_sha512_probe 60 61.globl OPENSSL_cleanse 62.type OPENSSL_cleanse,%function 63.align 5 64OPENSSL_cleanse: 65 cbz x1,.Lret // len==0? 66 cmp x1,#15 67 b.hi .Lot // len>15 68 nop 69.Little: 70 strb wzr,[x0],#1 // store byte-by-byte 71 subs x1,x1,#1 72 b.ne .Little 73.Lret: ret 74 75.align 4 76.Lot: tst x0,#7 77 b.eq .Laligned // inp is aligned 78 strb wzr,[x0],#1 // store byte-by-byte 79 sub x1,x1,#1 80 b .Lot 81 82.align 4 83.Laligned: 84 str xzr,[x0],#8 // store word-by-word 85 sub x1,x1,#8 86 tst x1,#-8 87 b.ne .Laligned // len>=8 88 cbnz x1,.Little // len!=0? 89 ret 90.size OPENSSL_cleanse,.-OPENSSL_cleanse 91 92.globl CRYPTO_memcmp 93.type CRYPTO_memcmp,%function 94.align 4 95CRYPTO_memcmp: 96 eor w3,w3,w3 97 cbz x2,.Lno_data // len==0? 98 cmp x2,#16 99 b.ne .Loop_cmp 100 ldp x8,x9,[x0] 101 ldp x10,x11,[x1] 102 eor x8,x8,x10 103 eor x9,x9,x11 104 orr x8,x8,x9 105 mov x0,#1 106 cmp x8,#0 107 csel x0,xzr,x0,eq 108 ret 109 110.align 4 111.Loop_cmp: 112 ldrb w4,[x0],#1 113 ldrb w5,[x1],#1 114 eor w4,w4,w5 115 orr w3,w3,w4 116 subs x2,x2,#1 117 b.ne .Loop_cmp 118 119.Lno_data: 120 neg w0,w3 121 lsr w0,w0,#31 122 ret 123.size CRYPTO_memcmp,.-CRYPTO_memcmp 124