summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ppccap.c
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2015-08-02 21:54:22 +0000
committercvs2svn <admin@example.com>2015-08-02 21:54:22 +0000
commited3760bf4be4a96a89233fb8f8b84a0d44725862 (patch)
tree5609c82060f75c53af0a7641d9b33a88574876cd /src/lib/libcrypto/ppccap.c
parentf8b563fb5ba1524c821d37308f4e6abfc866bc3f (diff)
downloadopenbsd-OPENBSD_5_8_BASE.tar.gz
openbsd-OPENBSD_5_8_BASE.tar.bz2
openbsd-OPENBSD_5_8_BASE.zip
This commit was manufactured by cvs2git to create tag 'OPENBSD_5_8_BASE'.OPENBSD_5_8_BASE
Diffstat (limited to 'src/lib/libcrypto/ppccap.c')
-rw-r--r--src/lib/libcrypto/ppccap.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/lib/libcrypto/ppccap.c b/src/lib/libcrypto/ppccap.c
deleted file mode 100644
index ce01edf6ec..0000000000
--- a/src/lib/libcrypto/ppccap.c
+++ /dev/null
@@ -1,50 +0,0 @@
1/* $OpenBSD: ppccap.c,v 1.6 2014/07/17 23:48:24 deraadt Exp $ */
2
3#include <sys/types.h>
4#include <sys/sysctl.h>
5#include <machine/cpu.h>
6#include <unistd.h>
7
8#include <crypto.h>
9#include <openssl/bn.h>
10
11#ifdef unused
12#define PPC_FPU64 (1<<0)
13#define PPC_ALTIVEC (1<<1)
14
15static int OPENSSL_ppccap_P = 0;
16#endif
17
18#ifdef OPENSSL_BN_ASM_MONT
19extern int bn_mul_mont_int(BN_ULONG *, const BN_ULONG *, const BN_ULONG *,
20 const BN_ULONG *, const BN_ULONG *, int);
21int
22bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
23 const BN_ULONG *np, const BN_ULONG *n0, int num)
24{
25 return bn_mul_mont_int(rp, ap, bp, np, n0, num);
26}
27#endif
28
29#ifdef unused
30void OPENSSL_cpuid_setup(void) __attribute__((constructor));
31
32void
33OPENSSL_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