From c5309fae9e0a7c650fcaf566ef6a37884967899f Mon Sep 17 00:00:00 2001 From: tevador Date: Mon, 18 Feb 2019 17:57:54 +0100 Subject: [PATCH] Fixed portable intrinsics compilation --- src/intrinPortable.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intrinPortable.h b/src/intrinPortable.h index c3ee8c7..392482c 100644 --- a/src/intrinPortable.h +++ b/src/intrinPortable.h @@ -57,6 +57,8 @@ inline __m128d _mm_abs(__m128d xd) { #include #include #include +#include +#include "blake2/endian.h" #define _mm_malloc(a,b) malloc(a) #define _mm_free(a) free(a) @@ -145,8 +147,8 @@ inline __m128d _mm_castsi128_pd(__m128i a) { } inline __m128d _mm_abs(__m128d xd) { - xd.lo = std::abs(xd.lo); - xd.hi = std::abs(xd.hi); + xd.lo = std::fabs(xd.lo); + xd.hi = std::fabs(xd.hi); return xd; }