From c9ae7e811fa9c0e2a51443bdcf3f29cdfd12b267 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Fri, 12 Jun 2020 09:22:17 -0700 Subject: [PATCH] Should fix non x64 platforms Need adam to check --- core/Salsa20.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/Salsa20.cpp b/core/Salsa20.cpp index c4c7e3c05..2643dba29 100644 --- a/core/Salsa20.cpp +++ b/core/Salsa20.cpp @@ -144,9 +144,13 @@ static ZT_INLINE void p_salsaCrypt(p_SalsaState *const state, const uint8_t *m, #endif for (;;) { +#ifdef ZT_SALSA20_SSE if (likely(bytes >= 64)) { _mm_prefetch(m + 128, _MM_HINT_T0); - } else { + } else { +#else + if (bytes < 64) { +#endif for (unsigned int i = 0;i < bytes;++i) tmp[i] = m[i]; m = tmp;