From 65dd610dcbcf5e1a952f341d0a441593bebe200f Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Thu, 7 Nov 2019 10:49:06 +0000 Subject: [arm][5/X] Implement Q-bit-setting SIMD32 intrinsics This patch implements some more Q-setting intrinsics of the multiply-accumulate variety, but these are in the SIMD32 family in that they treat their operands as packed SIMD values, but that's not important at the RTL level. * config/arm/arm.md (arm__insn): New define_insns. (arm_): New define_expands. * config/arm/arm_acle.h (__smlad, __smladx, __smlsd, __smlsdx, __smuad, __smuadx): Define. * config/arm/arm_acle_builtins.def: Define builtins for the above. * config/arm/iterators.md (SIMD32_TERNOP_Q): New int_iterator. (SIMD32_BINOP_Q): Likewise. (simd32_op): Handle the above. * config/arm/unspecs.md: Define unspecs for the above. * gcc.target/arm/acle/simd32.c: Update test. From-SVN: r277918 --- gcc/config/arm/arm_acle.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'gcc/config/arm/arm_acle.h') diff --git a/gcc/config/arm/arm_acle.h b/gcc/config/arm/arm_acle.h index b8d02a5..c30645e 100644 --- a/gcc/config/arm/arm_acle.h +++ b/gcc/config/arm/arm_acle.h @@ -522,6 +522,48 @@ __usub16 (uint16x2_t __a, uint16x2_t __b) return __builtin_arm_usub16 (__a, __b); } +__extension__ extern __inline int32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +__smlad (int16x2_t __a, int16x2_t __b, int32_t __c) +{ + return __builtin_arm_smlad (__a, __b, __c); +} + +__extension__ extern __inline int32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +__smladx (int16x2_t __a, int16x2_t __b, int32_t __c) +{ + return __builtin_arm_smladx (__a, __b, __c); +} + +__extension__ extern __inline int32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +__smlsd (int16x2_t __a, int16x2_t __b, int32_t __c) +{ + return __builtin_arm_smlsd (__a, __b, __c); +} + +__extension__ extern __inline int32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +__smlsdx (int16x2_t __a, int16x2_t __b, int32_t __c) +{ + return __builtin_arm_smlsdx (__a, __b, __c); +} + +__extension__ extern __inline int32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +__smuad (int16x2_t __a, int16x2_t __b) +{ + return __builtin_arm_smuad (__a, __b); +} + +__extension__ extern __inline int32_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +__smuadx (int16x2_t __a, int16x2_t __b) +{ + return __builtin_arm_smuadx (__a, __b); +} + #endif #ifdef __ARM_FEATURE_SAT -- cgit v1.1