From 2cfcf8e1f81f73bef7036aa401264e72d358fdb2 Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Fri, 22 Apr 2022 13:43:19 +0900 Subject: Fix build error when __ARM_FP is 2 - don't use (__ARM_FP & 2) for tizen Change-Id: If23708d27705099e0cf725bd6af629f878e4ce3d --- third_party/highway/hwy/base.h | 10 ++-------- third_party/highway/hwy/ops/arm_neon-inl.h | 6 ++++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/third_party/highway/hwy/base.h b/third_party/highway/hwy/base.h index c9e0d0c..cfcf3f9 100644 --- a/third_party/highway/hwy/base.h +++ b/third_party/highway/hwy/base.h @@ -220,7 +220,8 @@ static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 16; // Match [u]int##_t naming scheme so rvv-inl.h macros can obtain the type name // by concatenating base type and bits. -#if HWY_ARCH_ARM && (__ARM_FP & 2) +// Avoid __ARM_FP build error +#if HWY_ARCH_ARM && (__ARM_FP & 2) && !(__TIZEN__) #define HWY_NATIVE_FLOAT16 1 #else #define HWY_NATIVE_FLOAT16 0 @@ -231,17 +232,10 @@ static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 16; #if defined(HWY_EMULATE_SVE) using float16_t = FarmFloat16; #elif HWY_NATIVE_FLOAT16 -// Avoid "'__fp16' and '_Float16' not declared" build error -#if defined(__TIZEN__) -struct float16_t { - uint16_t bits; -}; -#else using float16_t = __fp16; // Clang does not allow __fp16 arguments, but scalar.h requires LaneType // arguments, so use a wrapper. // TODO(janwas): replace with _Float16 when that is supported? -#endif #else struct float16_t { uint16_t bits; diff --git a/third_party/highway/hwy/ops/arm_neon-inl.h b/third_party/highway/hwy/ops/arm_neon-inl.h index 774ca5d..b7a43c2 100644 --- a/third_party/highway/hwy/ops/arm_neon-inl.h +++ b/third_party/highway/hwy/ops/arm_neon-inl.h @@ -2491,7 +2491,8 @@ HWY_API Vec128 PromoteTo(Simd /* tag */, return Vec128(vget_low_s64(vmovl_s32(v.raw))); } -#if __ARM_FP & 2 +// Avoid __ARM_FP build error +#if (__ARM_FP & 2) && !(__TIZEN__) HWY_API Vec128 PromoteTo(Full128 /* tag */, const Vec128 v) { @@ -2621,7 +2622,8 @@ HWY_API Vec128 DemoteTo(Simd /* tag */, return Vec128(vqmovn_s16(vcombine_s16(v.raw, v.raw))); } -#if __ARM_FP & 2 +// Avoid __ARM_FP build error +#if (__ARM_FP & 2) && !(__TIZEN__) HWY_API Vec128 DemoteTo(Simd /* tag */, const Vec128 v) { -- cgit v1.2.3