mirror of https://github.com/openssl/openssl.git
Ensure code is compiled with correct BIGNUM assembler defines
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9130)
This commit is contained in:
parent
444ab3abb1
commit
a8140a42f5
30
Configure
30
Configure
|
@ -1407,13 +1407,31 @@ unless ($disabled{asm}) {
|
||||||
$target{bn_asm_src} =~ s/\w+-gf2m.c// if (defined($disabled{ec2m}));
|
$target{bn_asm_src} =~ s/\w+-gf2m.c// if (defined($disabled{ec2m}));
|
||||||
|
|
||||||
# bn-586 is the only one implementing bn_*_part_words
|
# bn-586 is the only one implementing bn_*_part_words
|
||||||
push @{$config{lib_defines}}, "OPENSSL_BN_ASM_PART_WORDS" if ($target{bn_asm_src} =~ /bn-586/);
|
if ($target{bn_asm_src} =~ /bn-586/) {
|
||||||
push @{$config{lib_defines}}, "OPENSSL_IA32_SSE2" if (!$disabled{sse2} && $target{bn_asm_src} =~ /86/);
|
push @{$config{lib_defines}}, "OPENSSL_BN_ASM_PART_WORDS";
|
||||||
|
push @{$config{module_defines}}, "OPENSSL_BN_ASM_PART_WORDS";
|
||||||
|
}
|
||||||
|
if (!$disabled{sse2} && $target{bn_asm_src} =~ /86/) {
|
||||||
|
push @{$config{lib_defines}}, "OPENSSL_IA32_SSE2";
|
||||||
|
push @{$config{module_defines}}, "OPENSSL_IA32_SSE2";
|
||||||
|
}
|
||||||
|
|
||||||
push @{$config{lib_defines}}, "OPENSSL_BN_ASM_MONT" if ($target{bn_asm_src} =~ /-mont/);
|
if ($target{bn_asm_src} =~ /-mont/) {
|
||||||
push @{$config{lib_defines}}, "OPENSSL_BN_ASM_MONT5" if ($target{bn_asm_src} =~ /-mont5/);
|
push @{$config{lib_defines}}, "OPENSSL_BN_ASM_MONT";
|
||||||
push @{$config{lib_defines}}, "OPENSSL_BN_ASM_GF2m" if ($target{bn_asm_src} =~ /-gf2m/);
|
push @{$config{module_defines}}, "OPENSSL_BN_ASM_MONT";
|
||||||
push @{$config{lib_defines}}, "BN_DIV3W" if ($target{bn_asm_src} =~ /-div3w/);
|
}
|
||||||
|
if ($target{bn_asm_src} =~ /-mont5/) {
|
||||||
|
push @{$config{lib_defines}}, "OPENSSL_BN_ASM_MONT5";
|
||||||
|
push @{$config{module_defines}}, "OPENSSL_BN_ASM_MONT5";
|
||||||
|
}
|
||||||
|
if ($target{bn_asm_src} =~ /-gf2m/) {
|
||||||
|
push @{$config{lib_defines}}, "OPENSSL_BN_ASM_GF2m";
|
||||||
|
push @{$config{module_defines}}, "OPENSSL_BN_ASM_GF2m";
|
||||||
|
}
|
||||||
|
if ($target{bn_asm_src} =~ /-div3w/) {
|
||||||
|
push @{$config{lib_defines}}, "BN_DIV3W";
|
||||||
|
push @{$config{module_defines}}, "BN_DIV3W";
|
||||||
|
}
|
||||||
|
|
||||||
if ($target{sha1_asm_src}) {
|
if ($target{sha1_asm_src}) {
|
||||||
push @{$config{lib_defines}}, "SHA1_ASM" if ($target{sha1_asm_src} =~ /sx86/ || $target{sha1_asm_src} =~ /sha1/);
|
push @{$config{lib_defines}}, "SHA1_ASM" if ($target{sha1_asm_src} =~ /sx86/ || $target{sha1_asm_src} =~ /sha1/);
|
||||||
|
|
|
@ -38,12 +38,8 @@ unsigned int OPENSSL_ppccap_P = 0;
|
||||||
|
|
||||||
static sigset_t all_masked;
|
static sigset_t all_masked;
|
||||||
|
|
||||||
/*
|
|
||||||
* TODO(3.0): Temporarily disabled some assembler that hasn't been brought into
|
#ifdef OPENSSL_BN_ASM_MONT
|
||||||
* the FIPS module yet.
|
|
||||||
*/
|
|
||||||
#ifndef FIPS_MODE
|
|
||||||
# ifdef OPENSSL_BN_ASM_MONT
|
|
||||||
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
|
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)
|
const BN_ULONG *np, const BN_ULONG *n0, int num)
|
||||||
{
|
{
|
||||||
|
@ -68,8 +64,12 @@ int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,
|
||||||
|
|
||||||
return bn_mul_mont_int(rp, ap, bp, np, n0, num);
|
return bn_mul_mont_int(rp, ap, bp, np, n0, num);
|
||||||
}
|
}
|
||||||
# endif
|
#endif
|
||||||
|
/*
|
||||||
|
* TODO(3.0): Temporarily disabled some assembler that hasn't been brought into
|
||||||
|
* the FIPS module yet.
|
||||||
|
*/
|
||||||
|
#ifndef FIPS_MODE
|
||||||
void sha256_block_p8(void *ctx, const void *inp, size_t len);
|
void sha256_block_p8(void *ctx, const void *inp, size_t len);
|
||||||
void sha256_block_ppc(void *ctx, const void *inp, size_t len);
|
void sha256_block_ppc(void *ctx, const void *inp, size_t len);
|
||||||
void sha256_block_data_order(void *ctx, const void *inp, size_t len);
|
void sha256_block_data_order(void *ctx, const void *inp, size_t len);
|
||||||
|
|
Loading…
Reference in New Issue