From: jiyong.min Date: Fri, 22 Apr 2022 04:43:19 +0000 (+0900) Subject: Fix build error when __ARM_FP is 2 X-Git-Tag: accepted/tizen/unified/20220424.221514^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F41%2F274141%2F2;p=platform%2Fupstream%2Flibjxl.git Fix build error when __ARM_FP is 2 - don't use (__ARM_FP & 2) for tizen Change-Id: If23708d27705099e0cf725bd6af629f878e4ce3d --- 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) {