[x264-devel] [PATCH] ppc: clang-7 will correct the xxpermdi behavior

Luca Barbato lu_zero at gentoo.org
Wed Jul 25 20:10:15 CEST 2018


See: https://reviews.llvm.org/rC337449
---

Also unbreak the ppcbe support with clang (even if clang-6 seems
to be broken on ppcbe distribution)

 common/ppc/ppccommon.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/common/ppc/ppccommon.h b/common/ppc/ppccommon.h
index 825ae643..34439c67 100644
--- a/common/ppc/ppccommon.h
+++ b/common/ppc/ppccommon.h
@@ -324,10 +324,9 @@ static const vec_u8_t xxpermdi3_perm = { 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
                                          0x0E, 0x0F, 0x18, 0x19, 0x1A, 0x1B,
                                          0x1C, 0x1D, 0x1E, 0x1F };
 #define xxpermdi(a, b, c) vec_perm(a, b, xxpermdi##c##_perm)
-#elif (defined(__clang__) && __clang_major__ == 6)
-#define xxpermdi(a, b, c) vec_xxpermdi(b, a, ((c >> 1) | (c & 1) << 1) ^ 3)
-#elif defined(__GNUC__) && \
-    (__GNUC__ > 6 || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3))
+#elif (defined(__GNUC__) && \
+    (__GNUC__ > 6 || (__GNUC__ == 6 && __GNUC_MINOR__ >= 3))) || \
+    (defined(__clang__) && __clang_major__ >= 7)
 #define xxpermdi(a, b, c) vec_xxpermdi(a, b, c)
 #endif

--
2.12.2



More information about the x264-devel mailing list