This will be used by cipher/hash implementations for access to
OPENSSL_sparcv9cap_P for feature detection.

Signed-off-by: David S. Miller <[email protected]>
---
 crypto/sparc_arch.h |   16 ++++++++++++++++
 crypto/sparcv9cap.c |   12 +++---------
 2 files changed, 19 insertions(+), 9 deletions(-)
 create mode 100644 crypto/sparc_arch.h

diff --git a/crypto/sparc_arch.h b/crypto/sparc_arch.h
new file mode 100644
index 0000000..14cec30
--- /dev/null
+++ b/crypto/sparc_arch.h
@@ -0,0 +1,16 @@
+#ifndef __SPARC_ARCH_H__
+#define __SPARC_ARCH_H__
+
+#if !__ASSEMBLER__
+extern int OPENSSL_sparcv9cap_P;
+#endif
+
+#define SPARCV9_TICK_PRIVILEGED        (1<<0)
+#define SPARCV9_PREFER_FPU     (1<<1)
+#define SPARCV9_VIS1           (1<<2)
+#define SPARCV9_VIS2           (1<<3)  /* reserved */
+#define SPARCV9_FMADD          (1<<4)  /* reserved for SPARC64 V */
+#define SPARCV9_BLK            (1<<5)  /* VIS1 block copy */
+#define SPARCV9_CFR            (1<<6)
+
+#endif
diff --git a/crypto/sparcv9cap.c b/crypto/sparcv9cap.c
index 240b9cd..7c4038f 100644
--- a/crypto/sparcv9cap.c
+++ b/crypto/sparcv9cap.c
@@ -6,15 +6,9 @@
 #include <sys/time.h>
 #include <openssl/bn.h>
 
-#define SPARCV9_TICK_PRIVILEGED        (1<<0)
-#define SPARCV9_PREFER_FPU     (1<<1)
-#define SPARCV9_VIS1           (1<<2)
-#define SPARCV9_VIS2           (1<<3)  /* reserved */
-#define SPARCV9_FMADD          (1<<4)  /* reserved for SPARC64 V */
-#define SPARCV9_BLK            (1<<5)  /* VIS1 block copy */
-#define SPARCV9_CFR            (1<<6)
-
-static int OPENSSL_sparcv9cap_P=SPARCV9_TICK_PRIVILEGED;
+#include "sparc_arch.h"
+
+int OPENSSL_sparcv9cap_P=SPARCV9_TICK_PRIVILEGED;
 
 int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const 
BN_ULONG *np,const BN_ULONG *n0, int num)
        {
-- 
1.7.10.4

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to