]> begriffs open source - cmsis/blob - CMSIS/Core/Include/cmsis_armcc.h
Updated cmsis_compiler.h
[cmsis] / CMSIS / Core / Include / cmsis_armcc.h
1 /**************************************************************************//**
2  * @file     cmsis_armcc.h
3  * @brief    CMSIS Cortex-M Core Function/Instruction Header File
4  * @version  V5.00
5  * @date     24. August 2016
6  ******************************************************************************/
7 /*
8  * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
9  *
10  * SPDX-License-Identifier: Apache-2.0
11  *
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
15  *
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
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.
23  */
24
25 #ifndef __CMSIS_ARMCC_H
26 #define __CMSIS_ARMCC_H
27
28
29 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 400677)
30   #error "Please use ARM Compiler Toolchain V4.0.677 or later!"
31 #endif
32
33 /* CMSIS compiler specific defines */
34 #ifndef   __ASM
35   #define __ASM                     __asm
36 #endif
37 #ifndef   __INLINE
38   #define __INLINE                  __inline
39 #endif
40 #ifndef   __STATIC_INLINE
41   #define __STATIC_INLINE           static __inline
42 #endif
43 #ifndef   __NO_RETURN
44   #define __NO_RETURN               __declspec(noreturn)
45 #endif
46 #ifndef   __USED
47   #define __USED                    __attribute__((used))
48 #endif
49 #ifndef   __WEAK
50   #define __WEAK                    __attribute__((weak))
51 #endif
52 #ifndef   __UNALIGNED_UINT32
53   #define __UNALIGNED_UINT32(x)     (*((__packed uint32_t *)(x)))
54 #endif
55 #ifndef   __ALIGNED
56   #define __ALIGNED(x)              __attribute__((aligned(x)))
57 #endif
58 #ifndef   __PACKED
59   #define __PACKED                  __attribute__((packed))
60 #endif
61
62
63 /* ###########################  Core Function Access  ########################### */
64 /** \ingroup  CMSIS_Core_FunctionInterface
65     \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
66   @{
67  */
68
69 /* intrinsic void __enable_irq();     */
70 /* intrinsic void __disable_irq();    */
71
72 /**
73   \brief   Get Control Register
74   \details Returns the content of the Control Register.
75   \return               Control Register value
76  */
77 __STATIC_INLINE uint32_t __get_CONTROL(void)
78 {
79   register uint32_t __regControl         __ASM("control");
80   return(__regControl);
81 }
82
83
84 /**
85   \brief   Set Control Register
86   \details Writes the given value to the Control Register.
87   \param [in]    control  Control Register value to set
88  */
89 __STATIC_INLINE void __set_CONTROL(uint32_t control)
90 {
91   register uint32_t __regControl         __ASM("control");
92   __regControl = control;
93 }
94
95
96 /**
97   \brief   Get IPSR Register
98   \details Returns the content of the IPSR Register.
99   \return               IPSR Register value
100  */
101 __STATIC_INLINE uint32_t __get_IPSR(void)
102 {
103   register uint32_t __regIPSR          __ASM("ipsr");
104   return(__regIPSR);
105 }
106
107
108 /**
109   \brief   Get APSR Register
110   \details Returns the content of the APSR Register.
111   \return               APSR Register value
112  */
113 __STATIC_INLINE uint32_t __get_APSR(void)
114 {
115   register uint32_t __regAPSR          __ASM("apsr");
116   return(__regAPSR);
117 }
118
119
120 /**
121   \brief   Get xPSR Register
122   \details Returns the content of the xPSR Register.
123   \return               xPSR Register value
124  */
125 __STATIC_INLINE uint32_t __get_xPSR(void)
126 {
127   register uint32_t __regXPSR          __ASM("xpsr");
128   return(__regXPSR);
129 }
130
131
132 /**
133   \brief   Get Process Stack Pointer
134   \details Returns the current value of the Process Stack Pointer (PSP).
135   \return               PSP Register value
136  */
137 __STATIC_INLINE uint32_t __get_PSP(void)
138 {
139   register uint32_t __regProcessStackPointer  __ASM("psp");
140   return(__regProcessStackPointer);
141 }
142
143
144 /**
145   \brief   Set Process Stack Pointer
146   \details Assigns the given value to the Process Stack Pointer (PSP).
147   \param [in]    topOfProcStack  Process Stack Pointer value to set
148  */
149 __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
150 {
151   register uint32_t __regProcessStackPointer  __ASM("psp");
152   __regProcessStackPointer = topOfProcStack;
153 }
154
155
156 /**
157   \brief   Get Main Stack Pointer
158   \details Returns the current value of the Main Stack Pointer (MSP).
159   \return               MSP Register value
160  */
161 __STATIC_INLINE uint32_t __get_MSP(void)
162 {
163   register uint32_t __regMainStackPointer     __ASM("msp");
164   return(__regMainStackPointer);
165 }
166
167
168 /**
169   \brief   Set Main Stack Pointer
170   \details Assigns the given value to the Main Stack Pointer (MSP).
171   \param [in]    topOfMainStack  Main Stack Pointer value to set
172  */
173 __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
174 {
175   register uint32_t __regMainStackPointer     __ASM("msp");
176   __regMainStackPointer = topOfMainStack;
177 }
178
179
180 /**
181   \brief   Get Priority Mask
182   \details Returns the current state of the priority mask bit from the Priority Mask Register.
183   \return               Priority Mask value
184  */
185 __STATIC_INLINE uint32_t __get_PRIMASK(void)
186 {
187   register uint32_t __regPriMask         __ASM("primask");
188   return(__regPriMask);
189 }
190
191
192 /**
193   \brief   Set Priority Mask
194   \details Assigns the given value to the Priority Mask Register.
195   \param [in]    priMask  Priority Mask
196  */
197 __STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
198 {
199   register uint32_t __regPriMask         __ASM("primask");
200   __regPriMask = (priMask);
201 }
202
203
204 #if ((defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M  == 1)) || \
205      (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))     )
206
207 /**
208   \brief   Enable FIQ
209   \details Enables FIQ interrupts by clearing the F-bit in the CPSR.
210            Can only be executed in Privileged modes.
211  */
212 #define __enable_fault_irq                __enable_fiq
213
214
215 /**
216   \brief   Disable FIQ
217   \details Disables FIQ interrupts by setting the F-bit in the CPSR.
218            Can only be executed in Privileged modes.
219  */
220 #define __disable_fault_irq               __disable_fiq
221
222
223 /**
224   \brief   Get Base Priority
225   \details Returns the current value of the Base Priority register.
226   \return               Base Priority register value
227  */
228 __STATIC_INLINE uint32_t  __get_BASEPRI(void)
229 {
230   register uint32_t __regBasePri         __ASM("basepri");
231   return(__regBasePri);
232 }
233
234
235 /**
236   \brief   Set Base Priority
237   \details Assigns the given value to the Base Priority register.
238   \param [in]    basePri  Base Priority value to set
239  */
240 __STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
241 {
242   register uint32_t __regBasePri         __ASM("basepri");
243   __regBasePri = (basePri & 0xFFU);
244 }
245
246
247 /**
248   \brief   Set Base Priority with condition
249   \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
250            or the new value increases the BASEPRI priority level.
251   \param [in]    basePri  Base Priority value to set
252  */
253 __STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
254 {
255   register uint32_t __regBasePriMax      __ASM("basepri_max");
256   __regBasePriMax = (basePri & 0xFFU);
257 }
258
259
260 /**
261   \brief   Get Fault Mask
262   \details Returns the current value of the Fault Mask register.
263   \return               Fault Mask register value
264  */
265 __STATIC_INLINE uint32_t __get_FAULTMASK(void)
266 {
267   register uint32_t __regFaultMask       __ASM("faultmask");
268   return(__regFaultMask);
269 }
270
271
272 /**
273   \brief   Set Fault Mask
274   \details Assigns the given value to the Fault Mask register.
275   \param [in]    faultMask  Fault Mask value to set
276  */
277 __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
278 {
279   register uint32_t __regFaultMask       __ASM("faultmask");
280   __regFaultMask = (faultMask & (uint32_t)1);
281 }
282
283 #endif /* ((defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M  == 1)) || \
284            (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))     ) */
285
286
287 #if ((defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))     )
288
289 /**
290   \brief   Get FPSCR
291   \details Returns the current value of the Floating Point Status/Control register.
292   \return               Floating Point Status/Control register value
293  */
294 __STATIC_INLINE uint32_t __get_FPSCR(void)
295 {
296 #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
297      (defined (__FPU_USED   ) && (__FPU_USED    == 1U))     )
298   register uint32_t __regfpscr         __ASM("fpscr");
299   return(__regfpscr);
300 #else
301    return(0U);
302 #endif
303 }
304
305
306 /**
307   \brief   Set FPSCR
308   \details Assigns the given value to the Floating Point Status/Control register.
309   \param [in]    fpscr  Floating Point Status/Control value to set
310  */
311 __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
312 {
313 #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
314      (defined (__FPU_USED   ) && (__FPU_USED    == 1U))     )
315   register uint32_t __regfpscr         __ASM("fpscr");
316   __regfpscr = (fpscr);
317 #endif
318 }
319
320 #endif /* ((defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))     ) */
321
322
323
324 /*@} end of CMSIS_Core_RegAccFunctions */
325
326
327 /* ##########################  Core Instruction Access  ######################### */
328 /** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
329   Access to dedicated instructions
330   @{
331 */
332
333 /**
334   \brief   No Operation
335   \details No Operation does nothing. This instruction can be used for code alignment purposes.
336  */
337 #define __NOP                             __nop
338
339
340 /**
341   \brief   Wait For Interrupt
342   \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs.
343  */
344 #define __WFI                             __wfi
345
346
347 /**
348   \brief   Wait For Event
349   \details Wait For Event is a hint instruction that permits the processor to enter
350            a low-power state until one of a number of events occurs.
351  */
352 #define __WFE                             __wfe
353
354
355 /**
356   \brief   Send Event
357   \details Send Event is a hint instruction. It causes an event to be signaled to the CPU.
358  */
359 #define __SEV                             __sev
360
361
362 /**
363   \brief   Instruction Synchronization Barrier
364   \details Instruction Synchronization Barrier flushes the pipeline in the processor,
365            so that all instructions following the ISB are fetched from cache or memory,
366            after the instruction has been completed.
367  */
368 #define __ISB() do {\
369                    __schedule_barrier();\
370                    __isb(0xF);\
371                    __schedule_barrier();\
372                 } while (0U)
373
374 /**
375   \brief   Data Synchronization Barrier
376   \details Acts as a special kind of Data Memory Barrier.
377            It completes when all explicit memory accesses before this instruction complete.
378  */
379 #define __DSB() do {\
380                    __schedule_barrier();\
381                    __dsb(0xF);\
382                    __schedule_barrier();\
383                 } while (0U)
384
385 /**
386   \brief   Data Memory Barrier
387   \details Ensures the apparent order of the explicit memory operations before
388            and after the instruction, without ensuring their completion.
389  */
390 #define __DMB() do {\
391                    __schedule_barrier();\
392                    __dmb(0xF);\
393                    __schedule_barrier();\
394                 } while (0U)
395
396 /**
397   \brief   Reverse byte order (32 bit)
398   \details Reverses the byte order in integer value.
399   \param [in]    value  Value to reverse
400   \return               Reversed value
401  */
402 #define __REV                             __rev
403
404
405 /**
406   \brief   Reverse byte order (16 bit)
407   \details Reverses the byte order in two unsigned short values.
408   \param [in]    value  Value to reverse
409   \return               Reversed value
410  */
411 #ifndef __NO_EMBEDDED_ASM
412 __attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value)
413 {
414   rev16 r0, r0
415   bx lr
416 }
417 #endif
418
419 /**
420   \brief   Reverse byte order in signed short value
421   \details Reverses the byte order in a signed short value with sign extension to integer.
422   \param [in]    value  Value to reverse
423   \return               Reversed value
424  */
425 #ifndef __NO_EMBEDDED_ASM
426 __attribute__((section(".revsh_text"))) __STATIC_INLINE __ASM int32_t __REVSH(int32_t value)
427 {
428   revsh r0, r0
429   bx lr
430 }
431 #endif
432
433
434 /**
435   \brief   Rotate Right in unsigned value (32 bit)
436   \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
437   \param [in]    value  Value to rotate
438   \param [in]    value  Number of Bits to rotate
439   \return               Rotated value
440  */
441 #define __ROR                             __ror
442
443
444 /**
445   \brief   Breakpoint
446   \details Causes the processor to enter Debug state.
447            Debug tools can use this to investigate system state when the instruction at a particular address is reached.
448   \param [in]    value  is ignored by the processor.
449                  If required, a debugger can use it to store additional information about the breakpoint.
450  */
451 #define __BKPT(value)                       __breakpoint(value)
452
453
454 /**
455   \brief   Reverse bit order of value
456   \details Reverses the bit order of the given value.
457   \param [in]    value  Value to reverse
458   \return               Reversed value
459  */
460 #if ((defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M  == 1)) || \
461      (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))     )
462   #define __RBIT                          __rbit
463 #else
464 __attribute__((always_inline)) __STATIC_INLINE uint32_t __RBIT(uint32_t value)
465 {
466   uint32_t result;
467   int32_t s = 4 /*sizeof(v)*/ * 8 - 1; /* extra shift needed at end */
468
469   result = value;                      /* r will be reversed bits of v; first get LSB of v */
470   for (value >>= 1U; value; value >>= 1U)
471   {
472     result <<= 1U;
473     result |= value & 1U;
474     s--;
475   }
476   result <<= s;                        /* shift when v's highest bits are zero */
477   return(result);
478 }
479 #endif
480
481
482 /**
483   \brief   Count leading zeros
484   \details Counts the number of leading zeros of a data value.
485   \param [in]  value  Value to count the leading zeros
486   \return             number of leading zeros in value
487  */
488 #define __CLZ                             __clz
489
490
491 #if ((defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M  == 1)) || \
492      (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))     )
493
494 /**
495   \brief   LDR Exclusive (8 bit)
496   \details Executes a exclusive LDR instruction for 8 bit value.
497   \param [in]    ptr  Pointer to data
498   \return             value of type uint8_t at (*ptr)
499  */
500 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
501   #define __LDREXB(ptr)                                                        ((uint8_t ) __ldrex(ptr))
502 #else
503   #define __LDREXB(ptr)          _Pragma("push") _Pragma("diag_suppress 3731") ((uint8_t ) __ldrex(ptr))  _Pragma("pop")
504 #endif
505
506
507 /**
508   \brief   LDR Exclusive (16 bit)
509   \details Executes a exclusive LDR instruction for 16 bit values.
510   \param [in]    ptr  Pointer to data
511   \return        value of type uint16_t at (*ptr)
512  */
513 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
514   #define __LDREXH(ptr)                                                        ((uint16_t) __ldrex(ptr))
515 #else
516   #define __LDREXH(ptr)          _Pragma("push") _Pragma("diag_suppress 3731") ((uint16_t) __ldrex(ptr))  _Pragma("pop")
517 #endif
518
519
520 /**
521   \brief   LDR Exclusive (32 bit)
522   \details Executes a exclusive LDR instruction for 32 bit values.
523   \param [in]    ptr  Pointer to data
524   \return        value of type uint32_t at (*ptr)
525  */
526 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
527   #define __LDREXW(ptr)                                                        ((uint32_t ) __ldrex(ptr))
528 #else
529   #define __LDREXW(ptr)          _Pragma("push") _Pragma("diag_suppress 3731") ((uint32_t ) __ldrex(ptr))  _Pragma("pop")
530 #endif
531
532
533 /**
534   \brief   STR Exclusive (8 bit)
535   \details Executes a exclusive STR instruction for 8 bit values.
536   \param [in]  value  Value to store
537   \param [in]    ptr  Pointer to location
538   \return          0  Function succeeded
539   \return          1  Function failed
540  */
541 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
542   #define __STREXB(value, ptr)                                                 __strex(value, ptr)
543 #else
544   #define __STREXB(value, ptr)   _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr)        _Pragma("pop")
545 #endif
546
547
548 /**
549   \brief   STR Exclusive (16 bit)
550   \details Executes a exclusive STR instruction for 16 bit values.
551   \param [in]  value  Value to store
552   \param [in]    ptr  Pointer to location
553   \return          0  Function succeeded
554   \return          1  Function failed
555  */
556 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
557   #define __STREXH(value, ptr)                                                 __strex(value, ptr)
558 #else
559   #define __STREXH(value, ptr)   _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr)        _Pragma("pop")
560 #endif
561
562
563 /**
564   \brief   STR Exclusive (32 bit)
565   \details Executes a exclusive STR instruction for 32 bit values.
566   \param [in]  value  Value to store
567   \param [in]    ptr  Pointer to location
568   \return          0  Function succeeded
569   \return          1  Function failed
570  */
571 #if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
572   #define __STREXW(value, ptr)                                                 __strex(value, ptr)
573 #else
574   #define __STREXW(value, ptr)   _Pragma("push") _Pragma("diag_suppress 3731") __strex(value, ptr)        _Pragma("pop")
575 #endif
576
577
578 /**
579   \brief   Remove the exclusive lock
580   \details Removes the exclusive lock which is created by LDREX.
581  */
582 #define __CLREX                           __clrex
583
584
585 /**
586   \brief   Signed Saturate
587   \details Saturates a signed value.
588   \param [in]  value  Value to be saturated
589   \param [in]    sat  Bit position to saturate to (1..32)
590   \return             Saturated value
591  */
592 #define __SSAT                            __ssat
593
594
595 /**
596   \brief   Unsigned Saturate
597   \details Saturates an unsigned value.
598   \param [in]  value  Value to be saturated
599   \param [in]    sat  Bit position to saturate to (0..31)
600   \return             Saturated value
601  */
602 #define __USAT                            __usat
603
604
605 /**
606   \brief   Rotate Right with Extend (32 bit)
607   \details Moves each bit of a bitstring right by one bit.
608            The carry input is shifted in at the left end of the bitstring.
609   \param [in]    value  Value to rotate
610   \return               Rotated value
611  */
612 #ifndef __NO_EMBEDDED_ASM
613 __attribute__((section(".rrx_text"))) __STATIC_INLINE __ASM uint32_t __RRX(uint32_t value)
614 {
615   rrx r0, r0
616   bx lr
617 }
618 #endif
619
620
621 /**
622   \brief   LDRT Unprivileged (8 bit)
623   \details Executes a Unprivileged LDRT instruction for 8 bit value.
624   \param [in]    ptr  Pointer to data
625   \return             value of type uint8_t at (*ptr)
626  */
627 #define __LDRBT(ptr)                      ((uint8_t )  __ldrt(ptr))
628
629
630 /**
631   \brief   LDRT Unprivileged (16 bit)
632   \details Executes a Unprivileged LDRT instruction for 16 bit values.
633   \param [in]    ptr  Pointer to data
634   \return        value of type uint16_t at (*ptr)
635  */
636 #define __LDRHT(ptr)                      ((uint16_t)  __ldrt(ptr))
637
638
639 /**
640   \brief   LDRT Unprivileged (32 bit)
641   \details Executes a Unprivileged LDRT instruction for 32 bit values.
642   \param [in]    ptr  Pointer to data
643   \return        value of type uint32_t at (*ptr)
644  */
645 #define __LDRT(ptr)                       ((uint32_t ) __ldrt(ptr))
646
647
648 /**
649   \brief   STRT Unprivileged (8 bit)
650   \details Executes a Unprivileged STRT instruction for 8 bit values.
651   \param [in]  value  Value to store
652   \param [in]    ptr  Pointer to location
653  */
654 #define __STRBT(value, ptr)               __strt(value, ptr)
655
656
657 /**
658   \brief   STRT Unprivileged (16 bit)
659   \details Executes a Unprivileged STRT instruction for 16 bit values.
660   \param [in]  value  Value to store
661   \param [in]    ptr  Pointer to location
662  */
663 #define __STRHT(value, ptr)               __strt(value, ptr)
664
665
666 /**
667   \brief   STRT Unprivileged (32 bit)
668   \details Executes a Unprivileged STRT instruction for 32 bit values.
669   \param [in]  value  Value to store
670   \param [in]    ptr  Pointer to location
671  */
672 #define __STRT(value, ptr)                __strt(value, ptr)
673
674 #endif /* ((defined (__TARGET_ARCH_7_M ) && (__TARGET_ARCH_7_M  == 1)) || \
675            (defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))     ) */
676
677 /*@}*/ /* end of group CMSIS_Core_InstructionInterface */
678
679
680 /* ###################  Compiler specific Intrinsics  ########################### */
681 /** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
682   Access to dedicated SIMD instructions
683   @{
684 */
685
686 #if ((defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))     )
687
688 #define __SADD8                           __sadd8
689 #define __QADD8                           __qadd8
690 #define __SHADD8                          __shadd8
691 #define __UADD8                           __uadd8
692 #define __UQADD8                          __uqadd8
693 #define __UHADD8                          __uhadd8
694 #define __SSUB8                           __ssub8
695 #define __QSUB8                           __qsub8
696 #define __SHSUB8                          __shsub8
697 #define __USUB8                           __usub8
698 #define __UQSUB8                          __uqsub8
699 #define __UHSUB8                          __uhsub8
700 #define __SADD16                          __sadd16
701 #define __QADD16                          __qadd16
702 #define __SHADD16                         __shadd16
703 #define __UADD16                          __uadd16
704 #define __UQADD16                         __uqadd16
705 #define __UHADD16                         __uhadd16
706 #define __SSUB16                          __ssub16
707 #define __QSUB16                          __qsub16
708 #define __SHSUB16                         __shsub16
709 #define __USUB16                          __usub16
710 #define __UQSUB16                         __uqsub16
711 #define __UHSUB16                         __uhsub16
712 #define __SASX                            __sasx
713 #define __QASX                            __qasx
714 #define __SHASX                           __shasx
715 #define __UASX                            __uasx
716 #define __UQASX                           __uqasx
717 #define __UHASX                           __uhasx
718 #define __SSAX                            __ssax
719 #define __QSAX                            __qsax
720 #define __SHSAX                           __shsax
721 #define __USAX                            __usax
722 #define __UQSAX                           __uqsax
723 #define __UHSAX                           __uhsax
724 #define __USAD8                           __usad8
725 #define __USADA8                          __usada8
726 #define __SSAT16                          __ssat16
727 #define __USAT16                          __usat16
728 #define __UXTB16                          __uxtb16
729 #define __UXTAB16                         __uxtab16
730 #define __SXTB16                          __sxtb16
731 #define __SXTAB16                         __sxtab16
732 #define __SMUAD                           __smuad
733 #define __SMUADX                          __smuadx
734 #define __SMLAD                           __smlad
735 #define __SMLADX                          __smladx
736 #define __SMLALD                          __smlald
737 #define __SMLALDX                         __smlaldx
738 #define __SMUSD                           __smusd
739 #define __SMUSDX                          __smusdx
740 #define __SMLSD                           __smlsd
741 #define __SMLSDX                          __smlsdx
742 #define __SMLSLD                          __smlsld
743 #define __SMLSLDX                         __smlsldx
744 #define __SEL                             __sel
745 #define __QADD                            __qadd
746 #define __QSUB                            __qsub
747
748 #define __PKHBT(ARG1,ARG2,ARG3)          ( ((((uint32_t)(ARG1))          ) & 0x0000FFFFUL) |  \
749                                            ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL)  )
750
751 #define __PKHTB(ARG1,ARG2,ARG3)          ( ((((uint32_t)(ARG1))          ) & 0xFFFF0000UL) |  \
752                                            ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL)  )
753
754 #define __SMMLA(ARG1,ARG2,ARG3)          ( (int32_t)((((int64_t)(ARG1) * (ARG2)) + \
755                                                       ((int64_t)(ARG3) << 32U)     ) >> 32U))
756
757 #endif /* ((defined (__TARGET_ARCH_7E_M) && (__TARGET_ARCH_7E_M == 1))     ) */
758 /*@} end of group CMSIS_SIMD_intrinsics */
759
760
761 #endif /* __CMSIS_ARMCC_H */