supranational / blst

Multilingual BLS12-381 signature library
Apache License 2.0
467 stars 177 forks source link

ADCX and ADOX are used for x86-64-v2 Rust build #156

Closed nazar-pc closed 1 year ago

nazar-pc commented 1 year ago

When compiled with Rust for x86-64 or x86-64-v2 (using -C target-cpu=x86-64-v2) that do not include those instructions, library still builds them and then crashes in runtime on Haswell CPUs that are perfectly capable of running either of those instruction sets otherwise. This regression happened when we integrated blst into our codebase and tracked it down to the library.

Library should honor platform choice of the user rather than using unsupported instructions.

dot-asm commented 1 year ago

Just in case for reference. None of the x86-64-v* cover adcx/adox extension. No, not even v4.

nazar-pc commented 1 year ago

Thanks, that works!