ppccap.c: tidy up.
ppc64-mont.pl: missing predicate in commentary.
This commit is contained in:
parent
b4b48a107c
commit
d741cf2267
@ -56,9 +56,9 @@
|
|||||||
# that asynchronous signals have to be blocked upon entry to this
|
# that asynchronous signals have to be blocked upon entry to this
|
||||||
# subroutine. Signal masking (and complementary unmasking) has quite
|
# subroutine. Signal masking (and complementary unmasking) has quite
|
||||||
# an impact on performance, naturally larger for shorter keys. It's
|
# an impact on performance, naturally larger for shorter keys. It's
|
||||||
# so severe that shorter key performance as low as 1/3 of expected
|
# so severe that shorter key performance can be as low as 1/3 of
|
||||||
# one. This is why this routine should be engaged for longer key
|
# expected one. This is why this routine can be engaged for longer
|
||||||
# operations only, see crypto/ppccap.c for further details.
|
# key operations only, see crypto/ppccap.c for further details.
|
||||||
# Alternative is to break dependance on upper halves on GPRs...
|
# Alternative is to break dependance on upper halves on GPRs...
|
||||||
# MacOS X is an exception from this and doesn't require signal
|
# MacOS X is an exception from this and doesn't require signal
|
||||||
# masking, and that's where above improvement coefficients were
|
# masking, and that's where above improvement coefficients were
|
||||||
|
@ -11,6 +11,7 @@ static int OPENSSL_ppccap_P = 0;
|
|||||||
|
|
||||||
static sigset_t all_masked;
|
static sigset_t all_masked;
|
||||||
|
|
||||||
|
#ifdef OPENSSL_BN_ASM_MONT
|
||||||
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)
|
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)
|
||||||
{
|
{
|
||||||
int bn_mul_mont_fpu64(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np, const BN_ULONG *n0, int num);
|
int bn_mul_mont_fpu64(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np, const BN_ULONG *n0, int num);
|
||||||
@ -44,6 +45,7 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_U
|
|||||||
|
|
||||||
return bn_mul_mont_int(rp,ap,bp,np,n0,num);
|
return bn_mul_mont_int(rp,ap,bp,np,n0,num);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static sigjmp_buf ill_jmp;
|
static sigjmp_buf ill_jmp;
|
||||||
static void ill_handler (int sig) { siglongjmp(ill_jmp,sig); }
|
static void ill_handler (int sig) { siglongjmp(ill_jmp,sig); }
|
||||||
@ -55,6 +57,8 @@ void OPENSSL_cpuid_setup(void)
|
|||||||
sigfillset(&all_masked);
|
sigfillset(&all_masked);
|
||||||
sigdelset(&all_masked,SIGSEGV);
|
sigdelset(&all_masked,SIGSEGV);
|
||||||
sigdelset(&all_masked,SIGILL);
|
sigdelset(&all_masked,SIGILL);
|
||||||
|
sigdelset(&all_masked,SIGBUS);
|
||||||
|
sigdelset(&all_masked,SIGFPE);
|
||||||
|
|
||||||
if ((e=getenv("OPENSSL_ppccap")))
|
if ((e=getenv("OPENSSL_ppccap")))
|
||||||
{
|
{
|
||||||
@ -69,8 +73,7 @@ void OPENSSL_cpuid_setup(void)
|
|||||||
|
|
||||||
memset(&ill_act,0,sizeof(ill_act));
|
memset(&ill_act,0,sizeof(ill_act));
|
||||||
ill_act.sa_handler = ill_handler;
|
ill_act.sa_handler = ill_handler;
|
||||||
sigfillset(&ill_act.sa_mask);
|
ill_act.sa_mask = all_masked;
|
||||||
sigdelset(&ill_act.sa_mask,SIGILL);
|
|
||||||
sigprocmask(SIG_SETMASK,&ill_act.sa_mask,&oset);
|
sigprocmask(SIG_SETMASK,&ill_act.sa_mask,&oset);
|
||||||
sigaction (SIGILL,&ill_act,&ill_oact);
|
sigaction (SIGILL,&ill_act,&ill_oact);
|
||||||
if (sigsetjmp(ill_jmp,0) == 0)
|
if (sigsetjmp(ill_jmp,0) == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user