mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 08:46:47 +08:00
[AArch64] Re-enable SME only for Linux and new versions of Clang
This was previously disabled in 679e851f653866a49e21f69fe8380bd20123f0ee, so re-enable it but only for Linux where SME is known to work correctly. Change-Id: I2626b03f3854b27162df1b55fc6767e02ffe318d Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5802958 Reviewed-by: Frank Barchard <fbarchard@chromium.org> Reviewed-by: Justin Green <greenjustin@google.com>
This commit is contained in:
parent
8315fa1d3a
commit
a37e6bc81b
@ -72,9 +72,11 @@ extern "C" {
|
|||||||
#define VISUALC_HAS_AVX2 1
|
#define VISUALC_HAS_AVX2 1
|
||||||
#endif // VisualStudio >= 2012
|
#endif // VisualStudio >= 2012
|
||||||
|
|
||||||
// Temporary disable SME.
|
// Clang 19 required for SME due to needing __arm_tpidr2_save from compiler-rt,
|
||||||
#if !defined(LIBYUV_DISABLE_SME)
|
// only enabled on Linux for now.
|
||||||
#define LIBYUV_DISABLE_SME
|
#if !defined(LIBYUV_DISABLE_SME) && defined(__aarch64__) && \
|
||||||
|
defined(__gnu_linux__) && defined(__clang__) && (__clang_major__ >= 19)
|
||||||
|
#define CLANG_HAS_SME 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@ -50,7 +50,8 @@ extern "C" {
|
|||||||
#define HAS_TRANSPOSE4X4_32_NEON
|
#define HAS_TRANSPOSE4X4_32_NEON
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LIBYUV_DISABLE_SME) && defined(__aarch64__)
|
#if !defined(LIBYUV_DISABLE_SME) && defined(CLANG_HAS_SME) && \
|
||||||
|
defined(__aarch64__)
|
||||||
#define HAS_TRANSPOSEWXH_SME
|
#define HAS_TRANSPOSEWXH_SME
|
||||||
#define HAS_TRANSPOSEUVWXH_SME
|
#define HAS_TRANSPOSEUVWXH_SME
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -18,7 +18,8 @@ namespace libyuv {
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(LIBYUV_DISABLE_SME) && defined(__aarch64__)
|
#if !defined(LIBYUV_DISABLE_SME) && defined(CLANG_HAS_SME) && \
|
||||||
|
defined(__aarch64__)
|
||||||
|
|
||||||
__arm_locally_streaming __arm_new("za") void TransposeWxH_SME(
|
__arm_locally_streaming __arm_new("za") void TransposeWxH_SME(
|
||||||
const uint8_t* src,
|
const uint8_t* src,
|
||||||
@ -164,7 +165,8 @@ __arm_locally_streaming __arm_new("za") void TransposeUVWxH_SME(
|
|||||||
} while (height > 0);
|
} while (height > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !defined(LIBYUV_DISABLE_SME) && defined(__aarch64__)
|
#endif // !defined(LIBYUV_DISABLE_SME) && defined(CLANG_HAS_SME) &&
|
||||||
|
// defined(__aarch64__)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user