From 21a2d4cbfbe44f35adc4655aee0378ef3d06b022 Mon Sep 17 00:00:00 2001 From: miod <> Date: Tue, 17 Jan 2023 15:04:27 +0000 Subject: 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@ --- src/lib/libcrypto/ppccap.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'src/lib/libcrypto/ppccap.c') 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 @@ -/* $OpenBSD: ppccap.c,v 1.6 2014/07/17 23:48:24 deraadt Exp $ */ +/* $OpenBSD: ppccap.c,v 1.7 2023/01/17 15:04:27 miod Exp $ */ #include #include @@ -8,13 +8,6 @@ #include #include -#ifdef unused -#define PPC_FPU64 (1<<0) -#define PPC_ALTIVEC (1<<1) - -static int OPENSSL_ppccap_P = 0; -#endif - #ifdef OPENSSL_BN_ASM_MONT extern int bn_mul_mont_int(BN_ULONG *, const BN_ULONG *, const BN_ULONG *, 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, return bn_mul_mont_int(rp, ap, bp, np, n0, num); } #endif - -#ifdef unused -void OPENSSL_cpuid_setup(void) __attribute__((constructor)); - -void -OPENSSL_cpuid_setup(void) -{ - static const int mib[2] = { CTL_MACHDEP, CPU_ALTIVEC }; - static int trigger = 0; - int altivec = 0; - size_t size; - - if (trigger) - return; - trigger = 1; - - size = sizeof altivec; - if (sysctl(mib, 2, &altivec, &size, NULL, 0) != -1) { - if (altivec != 0) - OPENSSL_ppccap_P |= PPC_ALTIVEC; - } -} -#endif -- cgit v1.2.3-55-g6feb