diff options
| author | jsing <> | 2024-10-19 13:06:11 +0000 |
|---|---|---|
| committer | jsing <> | 2024-10-19 13:06:11 +0000 |
| commit | 5d1b4ec04e3e4da6a278a481334cacf007acd117 (patch) | |
| tree | 80abe0c72655c8ae71236c909363b30c8bb010ba /src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c | |
| parent | 7b3a62204a3f352f62e8e84209e45b902d53e20d (diff) | |
| download | openbsd-5d1b4ec04e3e4da6a278a481334cacf007acd117.tar.gz openbsd-5d1b4ec04e3e4da6a278a481334cacf007acd117.tar.bz2 openbsd-5d1b4ec04e3e4da6a278a481334cacf007acd117.zip | |
Remove IA32 specific code from cryptlib.c.
Move the IA32 specific code to arch/{amd64,i386}/crypto_cpu_caps.c, rather
than polluting cryptlib.c with machine dependent code. A stub version of
crypto_cpu_caps_ia32() still remains for now.
Diffstat (limited to 'src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c')
| -rw-r--r-- | src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c b/src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c index 8cbf24edbd..b0da0d636c 100644 --- a/src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c +++ b/src/lib/libcrypto/arch/amd64/crypto_cpu_caps.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: crypto_cpu_caps.c,v 1.1 2024/10/18 13:36:24 jsing Exp $ */ | 1 | /* $OpenBSD: crypto_cpu_caps.c,v 1.2 2024/10/19 13:06:11 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2024 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -22,7 +22,7 @@ | |||
| 22 | #include "x86_arch.h" | 22 | #include "x86_arch.h" |
| 23 | 23 | ||
| 24 | /* Legacy architecture specific capabilities, used by perlasm. */ | 24 | /* Legacy architecture specific capabilities, used by perlasm. */ |
| 25 | extern uint64_t OPENSSL_ia32cap_P; | 25 | uint64_t OPENSSL_ia32cap_P; |
| 26 | 26 | ||
| 27 | /* Machine independent CPU capabilities. */ | 27 | /* Machine independent CPU capabilities. */ |
| 28 | extern uint64_t crypto_cpu_caps; | 28 | extern uint64_t crypto_cpu_caps; |
| @@ -112,3 +112,9 @@ crypto_cpu_caps_init(void) | |||
| 112 | 112 | ||
| 113 | OPENSSL_ia32cap_P = caps; | 113 | OPENSSL_ia32cap_P = caps; |
| 114 | } | 114 | } |
| 115 | |||
| 116 | uint64_t | ||
| 117 | crypto_cpu_caps_ia32(void) | ||
| 118 | { | ||
| 119 | return OPENSSL_ia32cap_P; | ||
| 120 | } | ||
