sike #1

Merged
kris merged 12 commits from sike into main 2021-04-19 00:00:36 +01:00
Showing only changes of commit 6b9aa0e10b - Show all commits

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;
}