You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chromium/SOURCES/0001-Fix-libdav1d-compilati...

34 lines
1.3 KiB

From e14024659e0fc2af3df6ec56ce39a8e93b75722d Mon Sep 17 00:00:00 2001
From: Colin Samples <colin.samples+git@gmail.com>
Date: Sun, 8 Dec 2019 19:25:02 -0500
Subject: [PATCH] Fix libdav1d compilation on clang ppc
---
src/ppc/dav1d_types.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
Index: chromium-120.0.6099.71/third_party/dav1d/libdav1d/src/ppc/dav1d_types.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/dav1d/libdav1d/src/ppc/dav1d_types.h
+++ chromium-120.0.6099.71/third_party/dav1d/libdav1d/src/ppc/dav1d_types.h
@@ -51,4 +51,19 @@
#define u16l_to_i32(v) ((i32x4) vec_mergel((u16x8) v, vec_splat_u16(0)))
#define i16l_to_i32(v) ((i32x4) vec_unpackl((i16x8)v))
+#if defined(__clang__)
+#undef vec_splats
+#define vec_splats(N) \
+ _Generic((N), \
+ unsigned char: ((u8x16)(N)), \
+ signed char: ((i8x16)(N)), \
+ unsigned short: ((u16x8)(N)), \
+ signed short: ((i16x8)(N)), \
+ unsigned int: ((u32x4)(N)), \
+ signed int: ((i32x4)(N)), \
+ unsigned long long: ((u64x2)(N)), \
+ signed long long: ((i64x2)(N)) \
+ )
+#endif
+
#endif /* DAV1D_SRC_PPC_TYPES_H */