]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/arm64/corecrypto/arm64_isa_compatibility.h
2 * Copyright (c) 2019 Apple Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
28 // #include <Availability.h>
29 #include <sys/cdefs.h>
31 #if defined(__clang__) && ((defined(__apple_build_version__) && __apple_build_version__ > 5010000))
32 #define __USES_V_CRYPTO_INTRINSICS 1
34 #define __USES_V_CRYPTO_INTRINSICS 0
45 // sha1su0.4s v0, v1, v2
47 // sha1c.4s v0, v1, v2 // or q0, s1, v2.4s
48 // sha1m.4s v0, v1, v2 // or q0, s1, v2.4s
49 // sha1p.4s v0, v1, v2 // or q0, s1, v2.4s
50 // sha1h.4s v0, v1 // or s0, s1
53 // sha256su0.4s v0, v1
54 // sha256su1.4s v0, v1, v2
55 // sha256h.4s v0, v1, v2 // or q0, q1, v2.4s
56 // sha256h2.4s v0, v1, v2 // or q0, q1, v2.4s
59 #if __USES_V_CRYPTO_INTRINSICS == 1
97 #if __USES_V_CRYPTO_INTRINSICS == 1
100 sha1su0 v$
0.4s
, v$
1.4s
, v$
2.4s
104 sha1su1 v$
0.4s
, v$
1.4s
108 sha1c q$
0, s$
1, v$
2.4s
112 sha1m q$
0, s$
1, v$
2.4s
116 sha1p q$
0, s$
1, v$
2.4s
124 sha256su0 v$
0.4s
, v$
1.4s
128 sha256su1 v$
0.4s
, v$
1.4s
, v$
2.4s
132 sha256h q$
0, q$
1, v$
2.4s
136 sha256h2 q$
0, q$
1, v$
2.4s
142 sha1su0 q$
0, q$
1, q$
2
170 sha256su1 q$
0, q$
1, q$
2
174 sha256h q$
0, q$
1, q$
2
178 sha256h2 q$
0, q$
1, q$
2