summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_exp.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2013-06-01 09:58:07 +0200
committerAndy Polyakov <appro@openssl.org>2013-06-01 09:58:07 +0200
commitb69437e1e5cdf9c6dfda17cc238f87f730b198ac (patch)
tree2dc7d635c58758dcd2600b9eb66542a657ed102f /crypto/bn/bn_exp.c
parent36df342f9b2faeeecc70a279395e9433f35e4622 (diff)
crypto/bn/bn_exp.c: SPARC portability fix.
Diffstat (limited to 'crypto/bn/bn_exp.c')
-rw-r--r--crypto/bn/bn_exp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index 8441994e9b..a6730a4374 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -126,7 +126,7 @@
# endif
#endif
-#if defined(OPENSSL_BN_ASM_MONT) && defined(__sparc__)
+#if defined(OPENSSL_BN_ASM_MONT) && (defined(__sparc__) || defined(__sparc))
# include "sparc_arch.h"
extern unsigned int OPENSSL_sparcv9cap_P[];
#endif
@@ -593,7 +593,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
int powerbufLen = 0;
unsigned char *powerbuf=NULL;
BIGNUM tmp, am;
-#if defined(OPENSSL_BN_ASM_MONT) && defined(__sparc__)
+#if defined(OPENSSL_BN_ASM_MONT) && (defined(__sparc__) || defined(__sparc))
unsigned int t4=0;
#endif
@@ -630,7 +630,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
/* Get the window size to use with size of p. */
window = BN_window_bits_for_ctime_exponent_size(bits);
-#if defined(OPENSSL_BN_ASM_MONT) && defined(__sparc__)
+#if defined(OPENSSL_BN_ASM_MONT) && (defined(__sparc__) || defined(__sparc))
if (window>=5 && (top&15)==0 && top<=64 &&
(OPENSSL_sparcv9cap_P[1]&(CFR_MONTMUL|CFR_MONTSQR))==
(CFR_MONTMUL|CFR_MONTSQR) &&
@@ -691,7 +691,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
}
else if (!BN_to_montgomery(&am,a,mont,ctx)) goto err;
-#if defined(OPENSSL_BN_ASM_MONT) && defined(__sparc__)
+#if defined(OPENSSL_BN_ASM_MONT) && (defined(__sparc__) || defined(__sparc))
if (t4)
{
typedef int (*bn_pwr5_mont_f)(BN_ULONG *tp,const BN_ULONG *np,