2020-12-10 06:01 AM
2020-12-10 07:42 AM
#include <arm_neon.h> vqadd_* ?
2020-12-10 07:52 AM
That's for the neon unit, not supported by M series. I'm talking about the qadd 'like' instructions as supported by M4/M7 etc
2020-12-10 08:25 AM
As i recall those were ARM RealView intrinsics
STM32F4xx_DSP_StdPeriph_Lib_V1.8.0\Libraries\CMSIS\Include\core_cmSimd.h
Later mapped with defines, the wrong way round for your case, but
#define __SMLSLDX __smlsldx
#define __SEL __sel
#define __QADD __qadd
#define __QSUB __qsub
With GNU/GCC doing this
__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QADD(uint32_t op1, uint32_t op2)
{
uint32_t result;
__ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
return(result);
}
__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __QSUB(uint32_t op1, uint32_t op2)
{
uint32_t result;
__ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
return(result);
}
2020-12-10 08:36 AM
OK so you have to add this yourself and its not supported directly by the GNU gcc used in STMCubdeIDE, thanks for the confirmation
2020-12-10 08:48 AM
Depending on the source/age you could create a similar #define translation, doing the reverse, or do a search-n-replace on the source as it is ported to the CMSIS formats.