diff options
author | George Steed <george.steed@arm.com> | 2024-02-07 15:40:34 +0000 |
---|---|---|
committer | James Zern <jzern@google.com> | 2024-02-13 19:48:14 +0000 |
commit | fe8b483e32d2f2fd7c9768b638be22cdf19095af (patch) | |
tree | ccd554c2ccfccbc6c12e872ac30e9fc5ac700c50 | |
parent | 9972ec4bdfbf4412b3ecafc9f76fc582080afbf8 (diff) | |
download | libaom-fe8b483e32d2f2fd7c9768b638be22cdf19095af.tar.gz |
mem_neon.h: Define vld1q_u16_x4 until GCC 8.5.0
When trying to build the library with GCC 8.3.0 the vld1q_u16_x4
intrinsic is not available, leading to the code failing to compile.
We already provide a definition for this helper for earlier versions of
GCC, so adjust the checks so we also provide it until GCC 8.5.0 instead.
Bug: aomedia:3543
Change-Id: I98a32ae6abd068f326a1075dd6782b190e2eac1d
(cherry picked from commit 0b2a8639c2aef7494d333fae47b3817d3c08e3d4)
-rw-r--r-- | aom_dsp/arm/mem_neon.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/aom_dsp/arm/mem_neon.h b/aom_dsp/arm/mem_neon.h index d1ac648d1..b86397f3b 100644 --- a/aom_dsp/arm/mem_neon.h +++ b/aom_dsp/arm/mem_neon.h @@ -56,17 +56,10 @@ static INLINE uint16x8x4_t vld1q_u16_x4(const uint16_t *ptr) { #elif defined(__GNUC__) && !defined(__clang__) // GCC 64-bit. #if __GNUC__ < 8 - static INLINE uint8x16x2_t vld1q_u8_x2(const uint8_t *ptr) { uint8x16x2_t res = { { vld1q_u8(ptr + 0 * 16), vld1q_u8(ptr + 1 * 16) } }; return res; } - -static INLINE uint16x8x4_t vld1q_u16_x4(const uint16_t *ptr) { - uint16x8x4_t res = { { vld1q_u16(ptr + 0 * 8), vld1q_u16(ptr + 1 * 8), - vld1q_u16(ptr + 2 * 8), vld1q_u16(ptr + 3 * 8) } }; - return res; -} #endif // __GNUC__ < 8 #if __GNUC__ < 9 @@ -76,6 +69,15 @@ static INLINE uint8x16x3_t vld1q_u8_x3(const uint8_t *ptr) { return res; } #endif // __GNUC__ < 9 + +// vld1q_u16_x4 is defined from GCC 8.5.0 and onwards. +#if ((__GNUC__ << 8) | __GNUC_MINOR__) < 0x805 +static INLINE uint16x8x4_t vld1q_u16_x4(const uint16_t *ptr) { + uint16x8x4_t res = { { vld1q_u16(ptr + 0 * 8), vld1q_u16(ptr + 1 * 8), + vld1q_u16(ptr + 2 * 8), vld1q_u16(ptr + 3 * 8) } }; + return res; +} +#endif // ((__GNUC__ << 8) | __GNUC_MINOR__) < 0x805 #endif // defined(__GNUC__) && !defined(__clang__) static INLINE void store_u8_8x2(uint8_t *s, ptrdiff_t p, const uint8x8_t s0, |