From 0a4b82a8ffd52107e9bfd38ba26daa8f75643087 Mon Sep 17 00:00:00 2001 From: Cary Phillips Date: Mon, 10 Jul 2023 01:59:00 -0700 Subject: [PATCH] Add OPENEXR_MISSING_ARM_VLD1 workaround to internal_dwa_simd.h (#1482) Addresses #1477 Signed-off-by: Cary Phillips --- src/lib/OpenEXRCore/internal_dwa_simd.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/OpenEXRCore/internal_dwa_simd.h b/src/lib/OpenEXRCore/internal_dwa_simd.h index 3f413e46d8..384e06e9ea 100644 --- a/src/lib/OpenEXRCore/internal_dwa_simd.h +++ b/src/lib/OpenEXRCore/internal_dwa_simd.h @@ -51,6 +51,20 @@ #include #endif +#include "OpenEXRConfigInternal.h" +#ifdef OPENEXR_MISSING_ARM_VLD1 +/* Workaround for missing vld1q_f32_x2 in older gcc versions. */ + +__extension__ extern __inline float32x4x2_t + __attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) + vld1q_f32_x2 (const float32_t* __a) +{ + float32x4x2_t ret; + asm ("ld1 {%S0.4s - %T0.4s}, [%1]" : "=w"(ret) : "r"(__a) :); + return ret; +} +#endif + // // Color space conversion, Inverse 709 CSC, Y'CbCr -> R'G'B' //