Add miss intrinsic by gcc-5.x
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/library/aesce.c b/library/aesce.c
index e236d86..7c5bcca 100644
--- a/library/aesce.c
+++ b/library/aesce.c
@@ -278,6 +278,18 @@
#if defined(MBEDTLS_GCM_C)
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 5
+/* GCC 5.X miss some intrinsics, we add them here. */
+#define vreinterpretq_p64_u8(a) ((poly64x2_t) a)
+#define vreinterpretq_u8_p128(a) ((uint8x16_t) a)
+static inline poly64_t vget_low_p64(poly64x2_t __a)
+{
+ uint64x2_t tmp = (uint64x2_t) (__a);
+ uint64x1_t lo = vcreate_u64(vgetq_lane_u64(tmp, 0));
+ return (poly64_t) (lo);
+}
+#endif /* !__clang__ && __GNUC__ && __GNUC__ == 5*/
+
static inline uint8x16_t pmull_low(uint8x16_t a, uint8x16_t b)
{
return vreinterpretq_u8_p128(