Blame SOURCES/0003-Fix-SIMD-support-on-IBM-z13.patch

7262ae
From 999efd5370b33e8b02d9370eda3d454e08fc9d15 Mon Sep 17 00:00:00 2001
7262ae
From: Andreas Arnez <arnez@linux.ibm.com>
7262ae
Date: Wed, 5 Dec 2018 18:59:15 +0100
7262ae
Subject: [PATCH 3/8] Fix SIMD support on IBM z13
7262ae
7262ae
The header file atlas_simd.h contained a syntax error and a few functional
7262ae
errors that affected IBM z13.  It prevented any SIMD kernels from being
7262ae
compiled successfully for that platform.  This is fixed.  The macro
7262ae
vec_madd is avoided, because some GCC versions don't implement it
7262ae
correctly; the equivalent GCC builtin __builtin_s390_vec_madd is used
7262ae
instead.
7262ae
---
7262ae
 include/atlas_simd.h | 10 +++++-----
7262ae
 1 file changed, 5 insertions(+), 5 deletions(-)
7262ae
7262ae
diff --git a/include/atlas_simd.h b/include/atlas_simd.h
7262ae
index baee6b1..68daf79 100644
7262ae
--- a/include/atlas_simd.h
7262ae
+++ b/include/atlas_simd.h
7262ae
@@ -69,7 +69,7 @@
7262ae
          #define ATL_FRCGNUVEC
7262ae
       #endif
7262ae
    #elif defined(ATL_VXZ)
7262ae
-      #if ATL_VLEN != 2;
7262ae
+      #if ATL_VLEN != 2
7262ae
          #define ATL_FRCGNUVEC
7262ae
       #endif
7262ae
    #elif defined(ATL_NEON)
7262ae
@@ -390,19 +390,19 @@
7262ae
       #define ATL_vld(v_, p_) v_ = vec_ld2f(p_);
7262ae
       #define ATL_vst(p_, v_) vec_st2f(v_, p_);
7262ae
    #endif
7262ae
-   #define ATL_vzero(v_) v_ = vec_splats((TYPE)0.0)
7262ae
+   #define ATL_vzero(v_) v_ = vec_splats((double)0.0)
7262ae
    #define ATL_vcopy(d_, s_) d_ = s_
7262ae
-   #define ATL_vbcast(v_, p_) v_ =  vec_splats(*((TYPE*)(p_)))
7262ae
+   #define ATL_vbcast(v_, p_) v_ = vec_splats((double)*((TYPE*)(p_)))
7262ae
    #define ATL_vuld(v_, p_) ATL_vld(v_, p_)
7262ae
    #define ATL_vust(p_, v_) ATL_vst(p_, v_)
7262ae
    #define ATL_vadd(d_, s1_, s2_) d_ =  s1_ + s2_
7262ae
    #define ATL_vsub(d_, s1_, s2_) d_ =  s1_ - s2_
7262ae
    #define ATL_vmul(d_, s1_, s2_) d_ =  s1_ * s2_
7262ae
-   #define ATL_vmac(d_, s1_, s2_) d_ = vec_madd(s1_, s2_, d_)
7262ae
+   #define ATL_vmac(d_, s1_, s2_) d_ = __builtin_s390_vec_madd(s1_, s2_, d_)
7262ae
    #define ATL_vvrsum1(s0_) \
7262ae
    {  ATL_VTYPE t_;\
7262ae
       t_ = vec_splat(s0_, 1); \
7262ae
-      s0 += t_; \
7262ae
+      s0_ += t_; \
7262ae
    }
7262ae
    #define ATL_vsplat0(d_, s_) d_ = vec_splat(s_, 0)
7262ae
    #define ATL_vsplat1(d_, s_) d_ = vec_splat(s_, 1)
7262ae
-- 
7262ae
2.23.0
7262ae