aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@google.com>2020-05-17 03:58:41 -0700
committerMarat Dukhan <maratek@google.com>2020-05-17 03:58:41 -0700
commit072586a71b55b7f8c584153d223e95687148a900 (patch)
tree49ce251d2c0ff0fc666283ff56ee36e881971752
parent85427dd4c8521cc037a1ffa6fcd25c55fafc8a00 (diff)
downloadpsimd-072586a71b55b7f8c584153d223e95687148a900.tar.gz
Fix psimd_qfma_f32 for FMA-enabled x86 processorsupstream-master
-rw-r--r--include/psimd.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/psimd.h b/include/psimd.h
index f674e46..b7cb65d 100644
--- a/include/psimd.h
+++ b/include/psimd.h
@@ -664,9 +664,9 @@
#if defined(__aarch64__) || defined(__ARM_NEON__) && defined(__ARM_FEATURE_FMA)
return (psimd_f32) vfmaq_f32((float32x4_t) a, (float32x4_t) b, (float32x4_t) c);
#elif (defined(__x86_64__) || defined(__i386__) || defined(__i686__)) && defined(__FMA__)
- return (psimd_f32) _mm_fmadd_ps((__m128) c, (__m128) a, (__m128) b);
+ return (psimd_f32) _mm_fmadd_ps((__m128) b, (__m128) c, (__m128) a);
#elif (defined(__x86_64__) || defined(__i386__) || defined(__i686__)) && defined(__FMA4__)
- return (psimd_f32) _mm_macc_ps((__m128) c, (__m128) a, (__m128) b);
+ return (psimd_f32) _mm_macc_ps((__m128) b, (__m128) c, (__m128) a);
#elif defined(__wasm__) && defined(__wasm_simd128__) && defined(__clang__) && PSIMD_ENABLE_WASM_QFMA
return (psimd_f32) __builtin_wasm_qfma_f32x4(a, b, c);
#else