Skip to content

Commit 2214138

Browse files
committed
Curve25519: Conservatively force noinline on ADX code paths.
See rust-lang/rust#116573.
1 parent 29fb827 commit 2214138

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

third_party/fiat/curve25519_64_adx.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ static void fe4_invert(fe4 out, const fe4 z) {
464464
fe4_mul(out, t1, t0);
465465
}
466466

467+
__attribute__((noinline)) // https://github.com/rust-lang/rust/issues/116573
467468
__attribute__((target("adx,bmi2")))
468469
void x25519_scalar_mult_adx(uint8_t out[32], const uint8_t scalar[32],
469470
const uint8_t point[32]) {
@@ -640,6 +641,7 @@ static inline void table_select_4(ge_precomp_4 *t, const int pos,
640641
//
641642
// Preconditions:
642643
// a[31] <= 127
644+
__attribute__((noinline)) // https://github.com/rust-lang/rust/issues/116573
643645
__attribute__((target("adx,bmi2")))
644646
void x25519_ge_scalarmult_base_adx(uint8_t h[4][32], const uint8_t a[32]) {
645647
signed char e[64];

0 commit comments

Comments
 (0)