From 9505d367c3ce249c9d786ced7bfbe6180536b39a Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Mon, 28 Dec 2015 16:50:01 -0800 Subject: [PATCH] Add SMMULR "intrinsic". --- .../os/hal/platforms/LPC43xx_M4/lpc43xx_m4.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/firmware/chibios-portapack/os/hal/platforms/LPC43xx_M4/lpc43xx_m4.h b/firmware/chibios-portapack/os/hal/platforms/LPC43xx_M4/lpc43xx_m4.h index bfbcda28..25f56907 100644 --- a/firmware/chibios-portapack/os/hal/platforms/LPC43xx_M4/lpc43xx_m4.h +++ b/firmware/chibios-portapack/os/hal/platforms/LPC43xx_M4/lpc43xx_m4.h @@ -241,6 +241,14 @@ __attribute__( ( always_inline ) ) static inline int64_t __SMLSLD (uint32_t op1, return(llr.w64); } +__attribute__( ( always_inline ) ) __STATIC_INLINE int32_t __SMMULR (int32_t op1, int32_t op2) +{ + uint32_t result; + + __ASM volatile ("smmulr %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) ); + return(result); +} + #endif /* __cplusplus */ #endif /* __LPC43XX_M4_H */