aboutsummaryrefslogtreecommitdiff
path: root/crypto/ppccap.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2009-12-29 11:18:16 +0000
committerAndy Polyakov <appro@openssl.org>2009-12-29 11:18:16 +0000
commit70b76d392fdfe192843c1a1f56389ffd1f493425 (patch)
tree9fe47ab09242fad66ac2e0de4e20cc665e465c2c /crypto/ppccap.c
parent6a9d28f9e4b536d53365733672806e914f513493 (diff)
downloadopenssl-70b76d392fdfe192843c1a1f56389ffd1f493425.zip
openssl-70b76d392fdfe192843c1a1f56389ffd1f493425.tar.gz
openssl-70b76d392fdfe192843c1a1f56389ffd1f493425.tar.bz2
ppccap.c: fix compiler warning and perform sanity check outside signal masking.
ppc64-mont.pl: clarify comment and fix spelling.
Diffstat (limited to 'crypto/ppccap.c')
-rw-r--r--crypto/ppccap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/ppccap.c b/crypto/ppccap.c
index 8590159..2c3e1f2 100644
--- a/crypto/ppccap.c
+++ b/crypto/ppccap.c
@@ -25,7 +25,7 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_U
#else
/* boundary of 32 was experimentally determined on
Linux 2.6.22, might have to be adjusted on AIX... */
- if ((num>=32) && (OPENSSL_ppccap_P&PPC_FPU64))
+ if (num>=32 && (num&3)==0 && (OPENSSL_ppccap_P&PPC_FPU64))
{
sigset_t oset;
int ret;
@@ -50,6 +50,8 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_U
static sigjmp_buf ill_jmp;
static void ill_handler (int sig) { siglongjmp(ill_jmp,sig); }
+void OPENSSL_ppc64_probe(void);
+
void OPENSSL_cpuid_setup(void)
{
char *e;