Skip to content

Commit

Permalink
Fix the ppc bn_mul_mont() to use the new prefix system
Browse files Browse the repository at this point in the history
The symbol prefix changes that began in commit 384f7d0 require
that cpu-ppc.c finds the generated prefix header and that bigint.rs
looks for the correctly prefixed bn_mul_mont().

Signed-off-by: Russell Currey <ruscur@russell.cc>
  • Loading branch information
ruscur authored and erichte-ibm committed Mar 11, 2022
1 parent fbf1fec commit 1eba9fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions crypto/cpu-ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
*/
/* This file is derived from ppccap.c in OpenSSL */


// Must be included for bn_mul_mont to have the correct symbol
#include <ring-core/base.h>

int bn_mul_mont_int(unsigned long *rp, const unsigned long *ap, const unsigned long *bp,
const unsigned long *np, const unsigned long *n0, int num);
int bn_mul4x_mont_int(unsigned long *rp, const unsigned long *ap, const unsigned long *bp,
const unsigned long *np, const unsigned long *n0, int num);
int GFp_bn_mul_mont(unsigned long *rp, const unsigned long *ap, const unsigned long *bp,
int bn_mul_mont(unsigned long *rp, const unsigned long *ap, const unsigned long *bp,
const unsigned long *np, const unsigned long *n0, int num)
{
if (num < 4)
Expand Down
3 changes: 2 additions & 1 deletion src/arithmetic/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,8 @@ fn limbs_mont_square(r: &mut [Limb], m: &[Limb], n0: &N0, _cpu_features: cpu::Fe
target_arch = "aarch64",
target_arch = "arm",
target_arch = "x86_64",
target_arch = "x86"
target_arch = "x86",
target_arch = "powerpc64"
))]
prefixed_extern! {
// `r` and/or 'a' and/or 'b' may alias.
Expand Down

0 comments on commit 1eba9fb

Please sign in to comment.