From: Mauricio Faria de Oliveira Date: Mon, 20 Dec 2021 13:15:18 +0000 (+0000) Subject: Skip optimizations for big-endian PowerPC. X-Git-Tag: archive/raspbian/3.10.3-12+rpi1^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5c446f0b02e3a008e78ba7baa64b894d78772e28;p=atlas.git Skip optimizations for big-endian PowerPC. Bug-Debian: https://bugs.debian.org/766695 Forwarded: http://sourceforge.net/p/math-atlas/patches/65/ Reviewed-by: Sébastien Villemot 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 --- diff --git a/tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c b/tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c index 59747c0..980d852 100644 --- a/tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c +++ b/tune/blas/gemm/CASES/ATL_cmm4x4x128_av.c @@ -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 */ diff --git a/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c b/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c index ec2f78b..b5a4ae0 100644 --- a/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c +++ b/tune/blas/gemm/CASES/ATL_dmm4x4x80_ppc.c @@ -28,6 +28,10 @@ * */ +#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 */ diff --git a/tune/blas/gemm/CASES/ATL_dmm8x4x2_vsx.c b/tune/blas/gemm/CASES/ATL_dmm8x4x2_vsx.c index 2761a39..1feb0ca 100644 --- a/tune/blas/gemm/CASES/ATL_dmm8x4x2_vsx.c +++ b/tune/blas/gemm/CASES/ATL_dmm8x4x2_vsx.c @@ -27,6 +27,10 @@ * */ +#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +/* FIXME: port to little-endian powerpc64. */ +#else + #include #include "atlas_misc.h" #include "atlas_prefetch.h" /* ATL_pfl1R, ATL_pfl1W */ @@ -659,3 +663,5 @@ void ATL_USERMM } } } + +#endif /* little-endian powerpc64 */ diff --git a/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c b/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c index b2bf952..0eb8866 100644 --- a/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c +++ b/tune/blas/gemm/CASES/ATL_smm4x4x128_av.c @@ -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 */ diff --git a/tune/blas/gemm/CASES/ATL_smm8x2x4_av.c b/tune/blas/gemm/CASES/ATL_smm8x2x4_av.c index 0e0cb5b..a959929 100644 --- a/tune/blas/gemm/CASES/ATL_smm8x2x4_av.c +++ b/tune/blas/gemm/CASES/ATL_smm8x2x4_av.c @@ -27,6 +27,10 @@ * */ +#if defined(__powerpc64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +/* FIXME: port to little-endian powerpc64. */ +#else + #include #include "atlas_misc.h" #include "atlas_prefetch.h" /* ATL_pfl1R, ATL_pfl1W */ @@ -326,3 +330,5 @@ void ATL_USERMM } } } + +#endif /* little-endian powerpc64 */