Skip optimizations for big-endian PowerPC.
authorMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Mon, 20 Sep 2021 16:02:49 +0000 (17:02 +0100)
committerSébastien Villemot <sebastien@debian.org>
Mon, 20 Sep 2021 16:02:49 +0000 (17:02 +0100)
Bug-Debian: https://bugs.debian.org/766695
Forwarded: http://sourceforge.net/p/math-atlas/patches/65/
Reviewed-by: Sébastien Villemot <sebastien@debian.org>
Last-Update: 2014-10-28

Some of the existing optimized files/cases for PowerPC
contain assembly instructions with implicit big-endian
behavior - thus incorrect for the little-endian mode -
incurring tests failures during the build (i.e., FTBFS).
This is being worked on; this is the workaround for now.

Note: this is an alternative for Michael Normand's patch
'atlas.3.10.2-ppc64le_do_not_use_files_with_lvx.patch',
in order not to touch file lists/indexes, but only C
source code, so the C preprocessor can avoid code per-arch.

For more details, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1080073#c40

Gbp-Pq: Name ppc64el-ifdef-files-with-lvx.patch

tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c
tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c
tune/blas/gemm/CASES/ATL_dmm8x4x2_vsx.c
tune/blas/gemm/CASES/ATL_smm4x4x128_av.c
tune/blas/gemm/CASES/ATL_smm8x2x4_av.c

index 59747c0700d90c102bb90b07142df52835566940..980d852047885259b24e891678c0556e6de03e31 100644 (file)
@@ -7,6 +7,11 @@
  * meaning that this kernel will do an extra store of vector C to memory
  * for load by the scalar FPU.
  */
+
+#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+/* FIXME: port to little-endian powerpc64. */
+#else
+
 #include "atlas_asm.h"
 
 #if !defined(ATL_AS_OSX_PPC) && !defined(ATL_GAS_LINUX_PPC)
@@ -4257,3 +4262,5 @@ MPEELEDU:
         ld      r3, FST(r1)
         addi    r1, r1, FSIZE
         blr
+
+#endif /* little-endian powerpc64 */
index ec2f78bd704ba1310f1426ef9fa6228f919b2fea..b5a4ae091d348afb394f620ff86d1bade292d3be 100644 (file)
  *
  */
 
+#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+/* FIXME: port to little-endian powerpc64. */
+#else
+
 #include "atlas_asm.h"
 /*
  * NOTE: this kernel written by R. Clint Whaley, but it uses two key ideas
@@ -7502,3 +7506,5 @@ DONE:
         addi    r1, r1, FSIZE
 #endif
         blr
+
+#endif  /* little-endian powerpc64 */
index 2761a3965e9556dd63b17944c868c90b8b63b465..1feb0ca20456f40ca239b549c1b3bf48073c323d 100644 (file)
  *
  */
 
+#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+/* FIXME: port to little-endian powerpc64. */
+#else
+
 #include <altivec.h>
 #include "atlas_misc.h"
 #include "atlas_prefetch.h"               /* ATL_pfl1R, ATL_pfl1W */
@@ -659,3 +663,5 @@ void ATL_USERMM
         }
     }
 }
+
+#endif  /* little-endian powerpc64 */
index b2bf952246035da6ba88e227fb14202b8bd62dc5..0eb886668209e924bd305552c9aa5a076a6ef44f 100644 (file)
@@ -28,6 +28,9 @@
  *
  */
 
+#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+/* FIXME: port to little-endian powerpc64. */
+#else
 
 #include "atlas_asm.h"
 
@@ -8340,3 +8343,5 @@ MPEELEDU:
         ld      r3, FST(r1)
         addi    r1, r1, FSIZE
         blr
+
+#endif  /* little-endian powerpc64 */
index 0e0cb5bb888383d5c26e0b8d6e502b6d8c8f96a6..a959929f38f46dd25015f7fff045ee34a328e0fd 100644 (file)
  *
  */
 
+#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+/* FIXME: port to little-endian powerpc64. */
+#else
+
 #include <altivec.h>
 #include "atlas_misc.h"
 #include "atlas_prefetch.h"               /* ATL_pfl1R, ATL_pfl1W */
@@ -326,3 +330,5 @@ void ATL_USERMM
         }
     }
 }
+
+#endif  /* little-endian powerpc64 */