2 # Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the Apache License 2.0 (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
10 # $output is the last argument if it looks like a file (it has an extension)
11 # $flavour is the first argument if it doesn't look like a file
12 $output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
13 $flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
15 $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
16 ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or
17 ( $xlate="${dir}perlasm/arm-xlate.pl" and -f $xlate) or
18 die "can't locate arm-xlate.pl";
20 open OUT,"| \"$^X\" $xlate $flavour \"$output\""
21 or die "can't call $xlate: $!";
27 #if defined(__thumb2__) && !defined(__APPLE__)
38 .global OPENSSL_atomic_add
39 .type OPENSSL_atomic_add,%function
55 add r6,r3,r2 @ &spinlock
57 .Lspin: bl sched_yield
66 str r0,[r6] @ release spinlock
70 .word 0xe12fff1e @ bx lr
72 .size OPENSSL_atomic_add,.-OPENSSL_atomic_add
74 .global OPENSSL_cleanse
75 .type OPENSSL_cleanse,%function
109 .word 0xe12fff1e @ bx lr
111 .size OPENSSL_cleanse,.-OPENSSL_cleanse
113 .global CRYPTO_memcmp
114 .type CRYPTO_memcmp,%function
139 .word 0xe12fff1e @ bx lr
141 .size CRYPTO_memcmp,.-CRYPTO_memcmp
143 #if __ARM_MAX_ARCH__>=7
148 .global _armv7_neon_probe
149 .type _armv7_neon_probe,%function
153 .size _armv7_neon_probe,.-_armv7_neon_probe
156 .type _armv7_tick,%function
159 mrrc p15,0,r0,r1,c14 @ CNTPCT
161 mrrc p15,1,r0,r1,c14 @ CNTVCT
164 .size _armv7_tick,.-_armv7_tick
166 .global _armv8_aes_probe
167 .type _armv8_aes_probe,%function
169 #if defined(__thumb2__) && !defined(__APPLE__)
170 .byte 0xb0,0xff,0x00,0x03 @ aese.8 q0,q0
172 .byte 0x00,0x03,0xb0,0xf3 @ aese.8 q0,q0
175 .size _armv8_aes_probe,.-_armv8_aes_probe
177 .global _armv8_sha1_probe
178 .type _armv8_sha1_probe,%function
180 #if defined(__thumb2__) && !defined(__APPLE__)
181 .byte 0x00,0xef,0x40,0x0c @ sha1c.32 q0,q0,q0
183 .byte 0x40,0x0c,0x00,0xf2 @ sha1c.32 q0,q0,q0
186 .size _armv8_sha1_probe,.-_armv8_sha1_probe
188 .global _armv8_sha256_probe
189 .type _armv8_sha256_probe,%function
191 #if defined(__thumb2__) && !defined(__APPLE__)
192 .byte 0x00,0xff,0x40,0x0c @ sha256h.32 q0,q0,q0
194 .byte 0x40,0x0c,0x00,0xf3 @ sha256h.32 q0,q0,q0
197 .size _armv8_sha256_probe,.-_armv8_sha256_probe
198 .global _armv8_pmull_probe
199 .type _armv8_pmull_probe,%function
201 #if defined(__thumb2__) && !defined(__APPLE__)
202 .byte 0xa0,0xef,0x00,0x0e @ vmull.p64 q0,d0,d0
204 .byte 0x00,0x0e,0xa0,0xf2 @ vmull.p64 q0,d0,d0
207 .size _armv8_pmull_probe,.-_armv8_pmull_probe
210 .global OPENSSL_wipe_cpu
211 .type OPENSSL_wipe_cpu,%function
213 #if __ARM_MAX_ARCH__>=7
214 ldr r0,.LOPENSSL_armcap
215 adr r1,.LOPENSSL_armcap
224 #if __ARM_MAX_ARCH__>=7
247 .word 0xe12fff1e @ bx lr
249 .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
251 .global OPENSSL_instrument_bus
252 .type OPENSSL_instrument_bus,%function
253 OPENSSL_instrument_bus:
260 .word 0xe12fff1e @ bx lr
262 .size OPENSSL_instrument_bus,.-OPENSSL_instrument_bus
264 .global OPENSSL_instrument_bus2
265 .type OPENSSL_instrument_bus2,%function
266 OPENSSL_instrument_bus2:
273 .word 0xe12fff1e @ bx lr
275 .size OPENSSL_instrument_bus2,.-OPENSSL_instrument_bus2
278 #if __ARM_MAX_ARCH__>=7
280 .word OPENSSL_armcap_P-.
286 .word atomic_add_spinlock-.Lspinlock
295 .comm OPENSSL_armcap_P,4,4
296 .hidden OPENSSL_armcap_P
300 close STDOUT or die "error closing STDOUT";