1 /**************************************************************************//**
3 * @brief CMSIS compiler ARMCC (Arm Compiler 5) header file
6 ******************************************************************************/
8 * Copyright (c) 2009-2019 Arm Limited. All rights reserved.
10 * SPDX-License-Identifier: Apache-2.0
12 * Licensed under the Apache License, Version 2.0 (the License); you may
13 * not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
16 * www.apache.org/licenses/LICENSE-2.0
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
25 #ifndef __CMSIS_ARMCC_H
26 #define __CMSIS_ARMCC_H
29 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 400677)
30 #error "Please use Arm Compiler Toolchain V4.0.677 or later!"
33 /* CMSIS compiler control architecture macros */
34 #if ((defined (__TARGET_ARCH_6_M ) && (__TARGET_ARCH_6_M == 1)) || \
35 (defined (__TARGET_ARCH_6S_M ) && (__TARGET_ARCH_6S_M == 1)) )
36 #define __ARM_ARCH_6M__ 1
39 #if (defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M == 1))
40 #define __ARM_ARCH_7M__ 1
43 #if (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))
44 #define __ARM_ARCH_7EM__ 1
47 /* __ARM_ARCH_8M_BASE__ not applicable */
48 /* __ARM_ARCH_8M_MAIN__ not applicable */
50 /* CMSIS compiler control DSP macros */
51 #if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
52 #define __ARM_FEATURE_DSP 1
55 /* CMSIS compiler specific defines */
60 #define __INLINE __inline
62 #ifndef __STATIC_INLINE
63 #define __STATIC_INLINE static __inline
65 #ifndef __STATIC_FORCEINLINE
66 #define __STATIC_FORCEINLINE static __forceinline
69 #define __NO_RETURN __declspec(noreturn)
72 #define __USED __attribute__((used))
75 #define __WEAK __attribute__((weak))
78 #define __PACKED __attribute__((packed))
80 #ifndef __PACKED_STRUCT
81 #define __PACKED_STRUCT __packed struct
83 #ifndef __PACKED_UNION
84 #define __PACKED_UNION __packed union
86 #ifndef __UNALIGNED_UINT32 /* deprecated */
87 #define __UNALIGNED_UINT32(x) (*((__packed uint32_t *)(x)))
89 #ifndef __UNALIGNED_UINT16_WRITE
90 #define __UNALIGNED_UINT16_WRITE(addr, val) ((*((__packed uint16_t *)(addr))) = (val))
92 #ifndef __UNALIGNED_UINT16_READ
93 #define __UNALIGNED_UINT16_READ(addr) (*((const __packed uint16_t *)(addr)))
95 #ifndef __UNALIGNED_UINT32_WRITE
96 #define __UNALIGNED_UINT32_WRITE(addr, val) ((*((__packed uint32_t *)(addr))) = (val))
98 #ifndef __UNALIGNED_UINT32_READ
99 #define __UNALIGNED_UINT32_READ(addr) (*((const __packed uint32_t *)(addr)))
102 #define __ALIGNED(x) __attribute__((aligned(x)))
105 #define __RESTRICT __restrict
108 /* ######################### Startup and Lowlevel Init ######################## */
110 #ifndef __PROGRAM_START
111 #define __PROGRAM_START __main
115 #define __INITIAL_SP Image$$ARM_LIB_STACK$$ZI$$Limit
118 #ifndef __STACK_LIMIT
119 #define __STACK_LIMIT Image$$ARM_LIB_STACK$$ZI$$Base
122 #ifndef __VECTOR_TABLE
123 #define __VECTOR_TABLE __Vectors
126 #ifndef __VECTOR_TABLE_ATTRIBUTE
127 #define __VECTOR_TABLE_ATTRIBUTE __attribute((used, section("RESET")))
130 /* ########################### Core Function Access ########################### */
131 /** \ingroup CMSIS_Core_FunctionInterface
132 \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
137 \brief Enable IRQ Interrupts
138 \details Enables IRQ interrupts by clearing the I-bit in the CPSR.
139 Can only be executed in Privileged modes.
141 /* intrinsic void __enable_irq(); */
145 \brief Disable IRQ Interrupts
146 \details Disables IRQ interrupts by setting the I-bit in the CPSR.
147 Can only be executed in Privileged modes.
149 /* intrinsic void __disable_irq(); */
152 \brief Get Control Register
153 \details Returns the content of the Control Register.
154 \return Control Register value
156 __STATIC_INLINE uint32_t __get_CONTROL(void)
158 register uint32_t __regControl __ASM("control");
159 return(__regControl);
164 \brief Set Control Register
165 \details Writes the given value to the Control Register.
166 \param [in] control Control Register value to set
168 __STATIC_INLINE void __set_CONTROL(uint32_t control)
170 register uint32_t __regControl __ASM("control");
171 __regControl = control;
176 \brief Get IPSR Register
177 \details Returns the content of the IPSR Register.
178 \return IPSR Register value
180 __STATIC_INLINE uint32_t __get_IPSR(void)
182 register uint32_t __regIPSR __ASM("ipsr");
188 \brief Get APSR Register
189 \details Returns the content of the APSR Register.
190 \return APSR Register value
192 __STATIC_INLINE uint32_t __get_APSR(void)
194 register uint32_t __regAPSR __ASM("apsr");
200 \brief Get xPSR Register
201 \details Returns the content of the xPSR Register.
202 \return xPSR Register value
204 __STATIC_INLINE uint32_t __get_xPSR(void)
206 register uint32_t __regXPSR __ASM("xpsr");
212 \brief Get Process Stack Pointer
213 \details Returns the current value of the Process Stack Pointer (PSP).
214 \return PSP Register value
216 __STATIC_INLINE uint32_t __get_PSP(void)
218 register uint32_t __regProcessStackPointer __ASM("psp");
219 return(__regProcessStackPointer);
224 \brief Set Process Stack Pointer
225 \details Assigns the given value to the Process Stack Pointer (PSP).
226 \param [in] topOfProcStack Process Stack Pointer value to set
228 __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
230 register uint32_t __regProcessStackPointer __ASM("psp");
231 __regProcessStackPointer = topOfProcStack;
236 \brief Get Main Stack Pointer
237 \details Returns the current value of the Main Stack Pointer (MSP).
238 \return MSP Register value
240 __STATIC_INLINE uint32_t __get_MSP(void)
242 register uint32_t __regMainStackPointer __ASM("msp");
243 return(__regMainStackPointer);
248 \brief Set Main Stack Pointer
249 \details Assigns the given value to the Main Stack Pointer (MSP).
250 \param [in] topOfMainStack Main Stack Pointer value to set
252 __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
254 register uint32_t __regMainStackPointer __ASM("msp");
255 __regMainStackPointer = topOfMainStack;
260 \brief Get Priority Mask
261 \details Returns the current state of the priority mask bit from the Priority Mask Register.
262 \return Priority Mask value
264 __STATIC_INLINE uint32_t __get_PRIMASK(void)
266 register uint32_t __regPriMask __ASM("primask");
267 return(__regPriMask);
272 \brief Set Priority Mask
273 \details Assigns the given value to the Priority Mask Register.
274 \param [in] priMask Priority Mask
276 __STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
278 register uint32_t __regPriMask __ASM("primask");
279 __regPriMask = (priMask);
283 #if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
284 (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
288 \details Enables FIQ interrupts by clearing the F-bit in the CPSR.
289 Can only be executed in Privileged modes.
291 #define __enable_fault_irq __enable_fiq
296 \details Disables FIQ interrupts by setting the F-bit in the CPSR.
297 Can only be executed in Privileged modes.
299 #define __disable_fault_irq __disable_fiq
303 \brief Get Base Priority
304 \details Returns the current value of the Base Priority register.
305 \return Base Priority register value
307 __STATIC_INLINE uint32_t __get_BASEPRI(void)
309 register uint32_t __regBasePri __ASM("basepri");
310 return(__regBasePri);
315 \brief Set Base Priority
316 \details Assigns the given value to the Base Priority register.
317 \param [in] basePri Base Priority value to set
319 __STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
321 register uint32_t __regBasePri __ASM("basepri");
322 __regBasePri = (basePri & 0xFFU);
327 \brief Set Base Priority with condition
328 \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
329 or the new value increases the BASEPRI priority level.
330 \param [in] basePri Base Priority value to set
332 __STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
334 register uint32_t __regBasePriMax __ASM("basepri_max");
335 __regBasePriMax = (basePri & 0xFFU);
340 \brief Get Fault Mask
341 \details Returns the current value of the Fault Mask register.
342 \return Fault Mask register value
344 __STATIC_INLINE uint32_t __get_FAULTMASK(void)
346 register uint32_t __regFaultMask __ASM("faultmask");
347 return(__regFaultMask);
352 \brief Set Fault Mask
353 \details Assigns the given value to the Fault Mask register.
354 \param [in] faultMask Fault Mask value to set
356 __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
358 register uint32_t __regFaultMask __ASM("faultmask");
359 __regFaultMask = (faultMask & (uint32_t)1U);
362 #endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
363 (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
368 \details Returns the current value of the Floating Point Status/Control register.
369 \return Floating Point Status/Control register value
371 __STATIC_INLINE uint32_t __get_FPSCR(void)
373 #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
374 (defined (__FPU_USED ) && (__FPU_USED == 1U)) )
375 register uint32_t __regfpscr __ASM("fpscr");
385 \details Assigns the given value to the Floating Point Status/Control register.
386 \param [in] fpscr Floating Point Status/Control value to set
388 __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
390 #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
391 (defined (__FPU_USED ) && (__FPU_USED == 1U)) )
392 register uint32_t __regfpscr __ASM("fpscr");
393 __regfpscr = (fpscr);
400 /*@} end of CMSIS_Core_RegAccFunctions */
403 /* ########################## Core Instruction Access ######################### */
404 /** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
405 Access to dedicated instructions
411 \details No Operation does nothing. This instruction can be used for code alignment purposes.
417 \brief Wait For Interrupt
418 \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs.
424 \brief Wait For Event
425 \details Wait For Event is a hint instruction that permits the processor to enter
426 a low-power state until one of a number of events occurs.
433 \details Send Event is a hint instruction. It causes an event to be signaled to the CPU.
439 \brief Instruction Synchronization Barrier
440 \details Instruction Synchronization Barrier flushes the pipeline in the processor,
441 so that all instructions following the ISB are fetched from cache or memory,
442 after the instruction has been completed.
444 #define __ISB() do {\
445 __schedule_barrier();\
447 __schedule_barrier();\
451 \brief Data Synchronization Barrier
452 \details Acts as a special kind of Data Memory Barrier.
453 It completes when all explicit memory accesses before this instruction complete.
455 #define __DSB() do {\
456 __schedule_barrier();\
458 __schedule_barrier();\
462 \brief Data Memory Barrier
463 \details Ensures the apparent order of the explicit memory operations before
464 and after the instruction, without ensuring their completion.
466 #define __DMB() do {\
467 __schedule_barrier();\
469 __schedule_barrier();\
474 \brief Reverse byte order (32 bit)
475 \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412.
476 \param [in] value Value to reverse
477 \return Reversed value
483 \brief Reverse byte order (16 bit)
484 \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856.
485 \param [in] value Value to reverse
486 \return Reversed value
488 #ifndef __NO_EMBEDDED_ASM
489 __attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value)
498 \brief Reverse byte order (16 bit)
499 \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000.
500 \param [in] value Value to reverse
501 \return Reversed value
503 #ifndef __NO_EMBEDDED_ASM
504 __attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int16_t __REVSH(int16_t value)
513 \brief Rotate Right in unsigned value (32 bit)
514 \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
515 \param [in] op1 Value to rotate
516 \param [in] op2 Number of Bits to rotate
517 \return Rotated value
524 \details Causes the processor to enter Debug state.
525 Debug tools can use this to investigate system state when the instruction at a particular address is reached.
526 \param [in] value is ignored by the processor.
527 If required, a debugger can use it to store additional information about the breakpoint.
529 #define __BKPT(value) __breakpoint(value)
533 \brief Reverse bit order of value
534 \details Reverses the bit order of the given value.
535 \param [in] value Value to reverse
536 \return Reversed value
538 #if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
539 (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
540 #define __RBIT __rbit
542 __attribute__((always_inline)) __STATIC_INLINE uint32_t __RBIT(uint32_t value)
545 uint32_t s = (4U /*sizeof(v)*/ * 8U) - 1U; /* extra shift needed at end */
547 result = value; /* r will be reversed bits of v; first get LSB of v */
548 for (value >>= 1U; value != 0U; value >>= 1U)
551 result |= value & 1U;
554 result <<= s; /* shift when v's highest bits are zero */
561 \brief Count leading zeros
562 \details Counts the number of leading zeros of a data value.
563 \param [in] value Value to count the leading zeros
564 \return number of leading zeros in value
569 #if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
570 (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
573 \brief LDR Exclusive (8 bit)
574 \details Executes a exclusive LDR instruction for 8 bit value.
575 \param [in] ptr Pointer to data
576 \return value of type uint8_t at (*ptr)
578 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
579 #define __LDREXB(ptr) ((uint8_t ) __ldrex(ptr))
581 #define __LDREXB(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint8_t ) __ldrex(ptr)) _Pragma("pop")
586 \brief LDR Exclusive (16 bit)
587 \details Executes a exclusive LDR instruction for 16 bit values.
588 \param [in] ptr Pointer to data
589 \return value of type uint16_t at (*ptr)
591 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
592 #define __LDREXH(ptr) ((uint16_t) __ldrex(ptr))
594 #define __LDREXH(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint16_t) __ldrex(ptr)) _Pragma("pop")
599 \brief LDR Exclusive (32 bit)
600 \details Executes a exclusive LDR instruction for 32 bit values.
601 \param [in] ptr Pointer to data
602 \return value of type uint32_t at (*ptr)
604 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
605 #define __LDREXW(ptr) ((uint32_t ) __ldrex(ptr))
607 #define __LDREXW(ptr) _Pragma("push") _Pragma("diag_suppress 3731") ((uint32_t ) __ldrex(ptr)) _Pragma("pop")
612 \brief STR Exclusive (8 bit)
613 \details Executes a exclusive STR instruction for 8 bit values.
614 \param [in] value Value to store
615 \param [in] ptr Pointer to location
616 \return 0 Function succeeded
617 \return 1 Function failed
619 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
620 #define __STREXB(value, ptr) __strex(value, ptr)
622 #define __STREXB(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop")
627 \brief STR Exclusive (16 bit)
628 \details Executes a exclusive STR instruction for 16 bit values.
629 \param [in] value Value to store
630 \param [in] ptr Pointer to location
631 \return 0 Function succeeded
632 \return 1 Function failed
634 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
635 #define __STREXH(value, ptr) __strex(value, ptr)
637 #define __STREXH(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop")
642 \brief STR Exclusive (32 bit)
643 \details Executes a exclusive STR instruction for 32 bit values.
644 \param [in] value Value to store
645 \param [in] ptr Pointer to location
646 \return 0 Function succeeded
647 \return 1 Function failed
649 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
650 #define __STREXW(value, ptr) __strex(value, ptr)
652 #define __STREXW(value, ptr) _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr) _Pragma("pop")
657 \brief Remove the exclusive lock
658 \details Removes the exclusive lock which is created by LDREX.
660 #define __CLREX __clrex
664 \brief Signed Saturate
665 \details Saturates a signed value.
666 \param [in] value Value to be saturated
667 \param [in] sat Bit position to saturate to (1..32)
668 \return Saturated value
670 #define __SSAT __ssat
674 \brief Unsigned Saturate
675 \details Saturates an unsigned value.
676 \param [in] value Value to be saturated
677 \param [in] sat Bit position to saturate to (0..31)
678 \return Saturated value
680 #define __USAT __usat
684 \brief Rotate Right with Extend (32 bit)
685 \details Moves each bit of a bitstring right by one bit.
686 The carry input is shifted in at the left end of the bitstring.
687 \param [in] value Value to rotate
688 \return Rotated value
690 #ifndef __NO_EMBEDDED_ASM
691 __attribute__((section(".rrx_text"))) __STATIC_INLINE __ASM uint32_t __RRX(uint32_t value)
700 \brief LDRT Unprivileged (8 bit)
701 \details Executes a Unprivileged LDRT instruction for 8 bit value.
702 \param [in] ptr Pointer to data
703 \return value of type uint8_t at (*ptr)
705 #define __LDRBT(ptr) ((uint8_t ) __ldrt(ptr))
709 \brief LDRT Unprivileged (16 bit)
710 \details Executes a Unprivileged LDRT instruction for 16 bit values.
711 \param [in] ptr Pointer to data
712 \return value of type uint16_t at (*ptr)
714 #define __LDRHT(ptr) ((uint16_t) __ldrt(ptr))
718 \brief LDRT Unprivileged (32 bit)
719 \details Executes a Unprivileged LDRT instruction for 32 bit values.
720 \param [in] ptr Pointer to data
721 \return value of type uint32_t at (*ptr)
723 #define __LDRT(ptr) ((uint32_t ) __ldrt(ptr))
727 \brief STRT Unprivileged (8 bit)
728 \details Executes a Unprivileged STRT instruction for 8 bit values.
729 \param [in] value Value to store
730 \param [in] ptr Pointer to location
732 #define __STRBT(value, ptr) __strt(value, ptr)
736 \brief STRT Unprivileged (16 bit)
737 \details Executes a Unprivileged STRT instruction for 16 bit values.
738 \param [in] value Value to store
739 \param [in] ptr Pointer to location
741 #define __STRHT(value, ptr) __strt(value, ptr)
745 \brief STRT Unprivileged (32 bit)
746 \details Executes a Unprivileged STRT instruction for 32 bit values.
747 \param [in] value Value to store
748 \param [in] ptr Pointer to location
750 #define __STRT(value, ptr) __strt(value, ptr)
752 #else /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
753 (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
756 \brief Signed Saturate
757 \details Saturates a signed value.
758 \param [in] value Value to be saturated
759 \param [in] sat Bit position to saturate to (1..32)
760 \return Saturated value
762 __attribute__((always_inline)) __STATIC_INLINE int32_t __SSAT(int32_t val, uint32_t sat)
764 if ((sat >= 1U) && (sat <= 32U))
766 const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U);
767 const int32_t min = -1 - max ;
781 \brief Unsigned Saturate
782 \details Saturates an unsigned value.
783 \param [in] value Value to be saturated
784 \param [in] sat Bit position to saturate to (0..31)
785 \return Saturated value
787 __attribute__((always_inline)) __STATIC_INLINE uint32_t __USAT(int32_t val, uint32_t sat)
791 const uint32_t max = ((1U << sat) - 1U);
792 if (val > (int32_t)max)
801 return (uint32_t)val;
804 #endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
805 (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
807 /*@}*/ /* end of group CMSIS_Core_InstructionInterface */
810 /* ################### Compiler specific Intrinsics ########################### */
811 /** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
812 Access to dedicated SIMD instructions
816 #if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
818 #define __SADD8 __sadd8
819 #define __QADD8 __qadd8
820 #define __SHADD8 __shadd8
821 #define __UADD8 __uadd8
822 #define __UQADD8 __uqadd8
823 #define __UHADD8 __uhadd8
824 #define __SSUB8 __ssub8
825 #define __QSUB8 __qsub8
826 #define __SHSUB8 __shsub8
827 #define __USUB8 __usub8
828 #define __UQSUB8 __uqsub8
829 #define __UHSUB8 __uhsub8
830 #define __SADD16 __sadd16
831 #define __QADD16 __qadd16
832 #define __SHADD16 __shadd16
833 #define __UADD16 __uadd16
834 #define __UQADD16 __uqadd16
835 #define __UHADD16 __uhadd16
836 #define __SSUB16 __ssub16
837 #define __QSUB16 __qsub16
838 #define __SHSUB16 __shsub16
839 #define __USUB16 __usub16
840 #define __UQSUB16 __uqsub16
841 #define __UHSUB16 __uhsub16
842 #define __SASX __sasx
843 #define __QASX __qasx
844 #define __SHASX __shasx
845 #define __UASX __uasx
846 #define __UQASX __uqasx
847 #define __UHASX __uhasx
848 #define __SSAX __ssax
849 #define __QSAX __qsax
850 #define __SHSAX __shsax
851 #define __USAX __usax
852 #define __UQSAX __uqsax
853 #define __UHSAX __uhsax
854 #define __USAD8 __usad8
855 #define __USADA8 __usada8
856 #define __SSAT16 __ssat16
857 #define __USAT16 __usat16
858 #define __UXTB16 __uxtb16
859 #define __UXTAB16 __uxtab16
860 #define __SXTB16 __sxtb16
861 #define __SXTAB16 __sxtab16
862 #define __SMUAD __smuad
863 #define __SMUADX __smuadx
864 #define __SMLAD __smlad
865 #define __SMLADX __smladx
866 #define __SMLALD __smlald
867 #define __SMLALDX __smlaldx
868 #define __SMUSD __smusd
869 #define __SMUSDX __smusdx
870 #define __SMLSD __smlsd
871 #define __SMLSDX __smlsdx
872 #define __SMLSLD __smlsld
873 #define __SMLSLDX __smlsldx
875 #define __QADD __qadd
876 #define __QSUB __qsub
878 #define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \
879 ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) )
881 #define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \
882 ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) )
884 #define __SMMLA(ARG1,ARG2,ARG3) ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \
885 ((int64_t)(ARG3) << 32U) ) >> 32U))
887 #endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
888 /*@} end of group CMSIS_SIMD_intrinsics */
891 #endif /* __CMSIS_ARMCC_H */