check if adox available

This commit is contained in:
Henry Case 2021-04-18 23:50:59 +01:00
parent 3683dcfa64
commit 6b9aa0e10b

View File

@ -97,8 +97,7 @@ void sike_mpmul(const felm_t a, const felm_t b, dfelm_t c)
crypto_word_t t = 0, u = 0, v = 0, UV[2];
unsigned int carry = 0;
// TODO: it actually needs BMI2 & ADOX. cpu_features needs to be updated
if (CPU_CAPS.bmi2) {
if (CPU_CAPS.bmi2 && CPU_CAPS.adx) {
sike_mpmul_asm(a,b,c);
return;
}
@ -138,7 +137,7 @@ void sike_mpmul(const felm_t a, const felm_t b, dfelm_t c)
void sike_fprdc_asm(const felm_t ma, felm_t mc);
void sike_fprdc(const felm_t ma, felm_t mc)
{
if (CPU_CAPS.bmi2) {
if (CPU_CAPS.bmi2 && CPU_CAPS.adx) {
sike_fprdc_asm(ma, mc);
return;
}