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