diff options
| author | miod <> | 2023-01-17 15:04:27 +0000 |
|---|---|---|
| committer | miod <> | 2023-01-17 15:04:27 +0000 |
| commit | a7f48cec18a6702191b620e72d8ffa41cd9173bc (patch) | |
| tree | ac2322b4572c0a9fa82ebffd1356547b8f6f6d3f /src/lib/libcrypto/ppccap.c | |
| parent | 20d1b90213a8f1388cd79c1f9893015b9be9380f (diff) | |
| download | openbsd-a7f48cec18a6702191b620e72d8ffa41cd9173bc.tar.gz openbsd-a7f48cec18a6702191b620e72d8ffa41cd9173bc.tar.bz2 openbsd-a7f48cec18a6702191b620e72d8ffa41cd9173bc.zip | |
Remove non-visible and unused OPENSSL_wipe_cpu and OPENSSL_atomic_add
interfaces, and remove empty assembly OPENSSL_cpuid_setup routines - the
default empty C fallback will work as good.
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/ppccap.c')
| -rw-r--r-- | src/lib/libcrypto/ppccap.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/lib/libcrypto/ppccap.c b/src/lib/libcrypto/ppccap.c index ce01edf6ec..8c4565f57c 100644 --- a/src/lib/libcrypto/ppccap.c +++ b/src/lib/libcrypto/ppccap.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ppccap.c,v 1.6 2014/07/17 23:48:24 deraadt Exp $ */ | 1 | /* $OpenBSD: ppccap.c,v 1.7 2023/01/17 15:04:27 miod Exp $ */ |
| 2 | 2 | ||
| 3 | #include <sys/types.h> | 3 | #include <sys/types.h> |
| 4 | #include <sys/sysctl.h> | 4 | #include <sys/sysctl.h> |
| @@ -8,13 +8,6 @@ | |||
| 8 | #include <crypto.h> | 8 | #include <crypto.h> |
| 9 | #include <openssl/bn.h> | 9 | #include <openssl/bn.h> |
| 10 | 10 | ||
| 11 | #ifdef unused | ||
| 12 | #define PPC_FPU64 (1<<0) | ||
| 13 | #define PPC_ALTIVEC (1<<1) | ||
| 14 | |||
| 15 | static int OPENSSL_ppccap_P = 0; | ||
| 16 | #endif | ||
| 17 | |||
| 18 | #ifdef OPENSSL_BN_ASM_MONT | 11 | #ifdef OPENSSL_BN_ASM_MONT |
| 19 | extern int bn_mul_mont_int(BN_ULONG *, const BN_ULONG *, const BN_ULONG *, | 12 | extern int bn_mul_mont_int(BN_ULONG *, const BN_ULONG *, const BN_ULONG *, |
| 20 | const BN_ULONG *, const BN_ULONG *, int); | 13 | const BN_ULONG *, const BN_ULONG *, int); |
| @@ -25,26 +18,3 @@ bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, | |||
| 25 | return bn_mul_mont_int(rp, ap, bp, np, n0, num); | 18 | return bn_mul_mont_int(rp, ap, bp, np, n0, num); |
| 26 | } | 19 | } |
| 27 | #endif | 20 | #endif |
| 28 | |||
| 29 | #ifdef unused | ||
| 30 | void OPENSSL_cpuid_setup(void) __attribute__((constructor)); | ||
| 31 | |||
| 32 | void | ||
| 33 | OPENSSL_cpuid_setup(void) | ||
| 34 | { | ||
| 35 | static const int mib[2] = { CTL_MACHDEP, CPU_ALTIVEC }; | ||
| 36 | static int trigger = 0; | ||
| 37 | int altivec = 0; | ||
| 38 | size_t size; | ||
| 39 | |||
| 40 | if (trigger) | ||
| 41 | return; | ||
| 42 | trigger = 1; | ||
| 43 | |||
| 44 | size = sizeof altivec; | ||
| 45 | if (sysctl(mib, 2, &altivec, &size, NULL, 0) != -1) { | ||
| 46 | if (altivec != 0) | ||
| 47 | OPENSSL_ppccap_P |= PPC_ALTIVEC; | ||
| 48 | } | ||
| 49 | } | ||
| 50 | #endif | ||
