Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curve25519: Conservatively force noinline on ADX code paths. #1717

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions third_party/fiat/curve25519_64_adx.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ static void fe4_invert(fe4 out, const fe4 z) {
fe4_mul(out, t1, t0);
}

__attribute__((noinline)) // https://github.com/rust-lang/rust/issues/116573
__attribute__((target("adx,bmi2")))
void x25519_scalar_mult_adx(uint8_t out[32], const uint8_t scalar[32],
const uint8_t point[32]) {
Expand Down Expand Up @@ -640,6 +641,7 @@ static inline void table_select_4(ge_precomp_4 *t, const int pos,
//
// Preconditions:
// a[31] <= 127
__attribute__((noinline)) // https://github.com/rust-lang/rust/issues/116573
__attribute__((target("adx,bmi2")))
void x25519_ge_scalarmult_base_adx(uint8_t h[4][32], const uint8_t a[32]) {
signed char e[64];
Expand Down
Loading