1 /**************************************************************************//**
\r
3 * @brief CMSIS compiler GCC header file
\r
5 * @date 13. February 2017
\r
6 ******************************************************************************/
\r
8 * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
\r
10 * SPDX-License-Identifier: Apache-2.0
\r
12 * Licensed under the Apache License, Version 2.0 (the License); you may
\r
13 * not use this file except in compliance with the License.
\r
14 * You may obtain a copy of the License at
\r
16 * www.apache.org/licenses/LICENSE-2.0
\r
18 * Unless required by applicable law or agreed to in writing, software
\r
19 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
\r
20 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
21 * See the License for the specific language governing permissions and
\r
22 * limitations under the License.
\r
25 #ifndef __CMSIS_GCC_H
\r
26 #define __CMSIS_GCC_H
\r
28 /* ignore some GCC warnings */
\r
29 #pragma GCC diagnostic push
\r
30 #pragma GCC diagnostic ignored "-Wsign-conversion"
\r
31 #pragma GCC diagnostic ignored "-Wconversion"
\r
32 #pragma GCC diagnostic ignored "-Wunused-parameter"
\r
34 /* Fallback for __has_builtin */
\r
35 #ifndef __has_builtin
\r
36 #define __has_builtin(x) (0)
\r
39 /* CMSIS compiler specific defines */
\r
44 #define __INLINE inline
\r
46 #ifndef __STATIC_INLINE
\r
47 #define __STATIC_INLINE static inline
\r
50 #define __NO_RETURN __attribute__((noreturn))
\r
53 #define __USED __attribute__((used))
\r
56 #define __WEAK __attribute__((weak))
\r
59 #define __PACKED __attribute__((packed, aligned(1)))
\r
61 #ifndef __PACKED_STRUCT
\r
62 #define __PACKED_STRUCT struct __attribute__((packed, aligned(1)))
\r
64 #ifndef __PACKED_UNION
\r
65 #define __PACKED_UNION union __attribute__((packed, aligned(1)))
\r
67 #ifndef __UNALIGNED_UINT32 /* deprecated */
\r
68 #pragma GCC diagnostic push
\r
69 #pragma GCC diagnostic ignored "-Wpacked"
\r
70 #pragma GCC diagnostic ignored "-Wattributes"
\r
71 struct __attribute__((packed)) T_UINT32 { uint32_t v; };
\r
72 #pragma GCC diagnostic pop
\r
73 #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
\r
75 #ifndef __UNALIGNED_UINT16_WRITE
\r
76 #pragma GCC diagnostic push
\r
77 #pragma GCC diagnostic ignored "-Wpacked"
\r
78 #pragma GCC diagnostic ignored "-Wattributes"
\r
79 __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
\r
80 #pragma GCC diagnostic pop
\r
81 #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
\r
83 #ifndef __UNALIGNED_UINT16_READ
\r
84 #pragma GCC diagnostic push
\r
85 #pragma GCC diagnostic ignored "-Wpacked"
\r
86 #pragma GCC diagnostic ignored "-Wattributes"
\r
87 __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
\r
88 #pragma GCC diagnostic pop
\r
89 #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
\r
91 #ifndef __UNALIGNED_UINT32_WRITE
\r
92 #pragma GCC diagnostic push
\r
93 #pragma GCC diagnostic ignored "-Wpacked"
\r
94 #pragma GCC diagnostic ignored "-Wattributes"
\r
95 __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
\r
96 #pragma GCC diagnostic pop
\r
97 #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
\r
99 #ifndef __UNALIGNED_UINT32_READ
\r
100 #pragma GCC diagnostic push
\r
101 #pragma GCC diagnostic ignored "-Wpacked"
\r
102 #pragma GCC diagnostic ignored "-Wattributes"
\r
103 __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
\r
104 #pragma GCC diagnostic pop
\r
105 #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
\r
108 #define __ALIGNED(x) __attribute__((aligned(x)))
\r
111 #define __RESTRICT __restrict
\r
115 /* ########################### Core Function Access ########################### */
\r
116 /** \ingroup CMSIS_Core_FunctionInterface
\r
117 \defgroup CMSIS_Core_RegAccFunctions CMSIS Core Register Access Functions
\r
122 \brief Enable IRQ Interrupts
\r
123 \details Enables IRQ interrupts by clearing the I-bit in the CPSR.
\r
124 Can only be executed in Privileged modes.
\r
126 __attribute__((always_inline)) __STATIC_INLINE void __enable_irq(void)
\r
128 __ASM volatile ("cpsie i" : : : "memory");
\r
133 \brief Disable IRQ Interrupts
\r
134 \details Disables IRQ interrupts by setting the I-bit in the CPSR.
\r
135 Can only be executed in Privileged modes.
\r
137 __attribute__((always_inline)) __STATIC_INLINE void __disable_irq(void)
\r
139 __ASM volatile ("cpsid i" : : : "memory");
\r
144 \brief Get Control Register
\r
145 \details Returns the content of the Control Register.
\r
146 \return Control Register value
\r
148 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_CONTROL(void)
\r
152 __ASM volatile ("MRS %0, control" : "=r" (result) );
\r
157 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
159 \brief Get Control Register (non-secure)
\r
160 \details Returns the content of the non-secure Control Register when in secure mode.
\r
161 \return non-secure Control Register value
\r
163 __attribute__((always_inline)) __STATIC_INLINE uint32_t __TZ_get_CONTROL_NS(void)
\r
167 __ASM volatile ("MRS %0, control_ns" : "=r" (result) );
\r
174 \brief Set Control Register
\r
175 \details Writes the given value to the Control Register.
\r
176 \param [in] control Control Register value to set
\r
178 __attribute__((always_inline)) __STATIC_INLINE void __set_CONTROL(uint32_t control)
\r
180 __ASM volatile ("MSR control, %0" : : "r" (control) : "memory");
\r
184 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
186 \brief Set Control Register (non-secure)
\r
187 \details Writes the given value to the non-secure Control Register when in secure state.
\r
188 \param [in] control Control Register value to set
\r
190 __attribute__((always_inline)) __STATIC_INLINE void __TZ_set_CONTROL_NS(uint32_t control)
\r
192 __ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory");
\r
198 \brief Get IPSR Register
\r
199 \details Returns the content of the IPSR Register.
\r
200 \return IPSR Register value
\r
202 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_IPSR(void)
\r
206 __ASM volatile ("MRS %0, ipsr" : "=r" (result) );
\r
212 \brief Get APSR Register
\r
213 \details Returns the content of the APSR Register.
\r
214 \return APSR Register value
\r
216 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_APSR(void)
\r
220 __ASM volatile ("MRS %0, apsr" : "=r" (result) );
\r
226 \brief Get xPSR Register
\r
227 \details Returns the content of the xPSR Register.
\r
228 \return xPSR Register value
\r
230 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_xPSR(void)
\r
234 __ASM volatile ("MRS %0, xpsr" : "=r" (result) );
\r
240 \brief Get Process Stack Pointer
\r
241 \details Returns the current value of the Process Stack Pointer (PSP).
\r
242 \return PSP Register value
\r
244 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_PSP(void)
\r
246 register uint32_t result;
\r
248 __ASM volatile ("MRS %0, psp" : "=r" (result) );
\r
253 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
255 \brief Get Process Stack Pointer (non-secure)
\r
256 \details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state.
\r
257 \return PSP Register value
\r
259 __attribute__((always_inline)) __STATIC_INLINE uint32_t __TZ_get_PSP_NS(void)
\r
261 register uint32_t result;
\r
263 __ASM volatile ("MRS %0, psp_ns" : "=r" (result) );
\r
270 \brief Set Process Stack Pointer
\r
271 \details Assigns the given value to the Process Stack Pointer (PSP).
\r
272 \param [in] topOfProcStack Process Stack Pointer value to set
\r
274 __attribute__((always_inline)) __STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
\r
276 __ASM volatile ("MSR psp, %0" : : "r" (topOfProcStack) : );
\r
280 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
282 \brief Set Process Stack Pointer (non-secure)
\r
283 \details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state.
\r
284 \param [in] topOfProcStack Process Stack Pointer value to set
\r
286 __attribute__((always_inline)) __STATIC_INLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack)
\r
288 __ASM volatile ("MSR psp_ns, %0" : : "r" (topOfProcStack) : );
\r
294 \brief Get Main Stack Pointer
\r
295 \details Returns the current value of the Main Stack Pointer (MSP).
\r
296 \return MSP Register value
\r
298 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_MSP(void)
\r
300 register uint32_t result;
\r
302 __ASM volatile ("MRS %0, msp" : "=r" (result) );
\r
307 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
309 \brief Get Main Stack Pointer (non-secure)
\r
310 \details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state.
\r
311 \return MSP Register value
\r
313 __attribute__((always_inline)) __STATIC_INLINE uint32_t __TZ_get_MSP_NS(void)
\r
315 register uint32_t result;
\r
317 __ASM volatile ("MRS %0, msp_ns" : "=r" (result) );
\r
324 \brief Set Main Stack Pointer
\r
325 \details Assigns the given value to the Main Stack Pointer (MSP).
\r
326 \param [in] topOfMainStack Main Stack Pointer value to set
\r
328 __attribute__((always_inline)) __STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
\r
330 __ASM volatile ("MSR msp, %0" : : "r" (topOfMainStack) : );
\r
334 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
336 \brief Set Main Stack Pointer (non-secure)
\r
337 \details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state.
\r
338 \param [in] topOfMainStack Main Stack Pointer value to set
\r
340 __attribute__((always_inline)) __STATIC_INLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack)
\r
342 __ASM volatile ("MSR msp_ns, %0" : : "r" (topOfMainStack) : );
\r
347 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
349 \brief Get Stack Pointer (non-secure)
\r
350 \details Returns the current value of the non-secure Stack Pointer (SP) when in secure state.
\r
351 \return SP Register value
\r
353 __attribute__((always_inline)) __STATIC_INLINE uint32_t __TZ_get_SP_NS(void)
\r
355 register uint32_t result;
\r
357 __ASM volatile ("MRS %0, sp_ns" : "=r" (result) );
\r
363 \brief Set Stack Pointer (non-secure)
\r
364 \details Assigns the given value to the non-secure Stack Pointer (SP) when in secure state.
\r
365 \param [in] topOfStack Stack Pointer value to set
\r
367 __attribute__((always_inline)) __STATIC_INLINE void __TZ_set_SP_NS(uint32_t topOfStack)
\r
369 __ASM volatile ("MSR sp_ns, %0" : : "r" (topOfStack) : );
\r
375 \brief Get Priority Mask
\r
376 \details Returns the current state of the priority mask bit from the Priority Mask Register.
\r
377 \return Priority Mask value
\r
379 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_PRIMASK(void)
\r
383 __ASM volatile ("MRS %0, primask" : "=r" (result) );
\r
388 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
390 \brief Get Priority Mask (non-secure)
\r
391 \details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state.
\r
392 \return Priority Mask value
\r
394 __attribute__((always_inline)) __STATIC_INLINE uint32_t __TZ_get_PRIMASK_NS(void)
\r
398 __ASM volatile ("MRS %0, primask_ns" : "=r" (result) );
\r
405 \brief Set Priority Mask
\r
406 \details Assigns the given value to the Priority Mask Register.
\r
407 \param [in] priMask Priority Mask
\r
409 __attribute__((always_inline)) __STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
\r
411 __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
\r
415 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
417 \brief Set Priority Mask (non-secure)
\r
418 \details Assigns the given value to the non-secure Priority Mask Register when in secure state.
\r
419 \param [in] priMask Priority Mask
\r
421 __attribute__((always_inline)) __STATIC_INLINE void __TZ_set_PRIMASK_NS(uint32_t priMask)
\r
423 __ASM volatile ("MSR primask_ns, %0" : : "r" (priMask) : "memory");
\r
428 #if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
\r
429 (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
\r
430 (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) )
\r
433 \details Enables FIQ interrupts by clearing the F-bit in the CPSR.
\r
434 Can only be executed in Privileged modes.
\r
436 __attribute__((always_inline)) __STATIC_INLINE void __enable_fault_irq(void)
\r
438 __ASM volatile ("cpsie f" : : : "memory");
\r
444 \details Disables FIQ interrupts by setting the F-bit in the CPSR.
\r
445 Can only be executed in Privileged modes.
\r
447 __attribute__((always_inline)) __STATIC_INLINE void __disable_fault_irq(void)
\r
449 __ASM volatile ("cpsid f" : : : "memory");
\r
454 \brief Get Base Priority
\r
455 \details Returns the current value of the Base Priority register.
\r
456 \return Base Priority register value
\r
458 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_BASEPRI(void)
\r
462 __ASM volatile ("MRS %0, basepri" : "=r" (result) );
\r
467 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
469 \brief Get Base Priority (non-secure)
\r
470 \details Returns the current value of the non-secure Base Priority register when in secure state.
\r
471 \return Base Priority register value
\r
473 __attribute__((always_inline)) __STATIC_INLINE uint32_t __TZ_get_BASEPRI_NS(void)
\r
477 __ASM volatile ("MRS %0, basepri_ns" : "=r" (result) );
\r
484 \brief Set Base Priority
\r
485 \details Assigns the given value to the Base Priority register.
\r
486 \param [in] basePri Base Priority value to set
\r
488 __attribute__((always_inline)) __STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
\r
490 __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory");
\r
494 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
496 \brief Set Base Priority (non-secure)
\r
497 \details Assigns the given value to the non-secure Base Priority register when in secure state.
\r
498 \param [in] basePri Base Priority value to set
\r
500 __attribute__((always_inline)) __STATIC_INLINE void __TZ_set_BASEPRI_NS(uint32_t basePri)
\r
502 __ASM volatile ("MSR basepri_ns, %0" : : "r" (basePri) : "memory");
\r
508 \brief Set Base Priority with condition
\r
509 \details Assigns the given value to the Base Priority register only if BASEPRI masking is disabled,
\r
510 or the new value increases the BASEPRI priority level.
\r
511 \param [in] basePri Base Priority value to set
\r
513 __attribute__((always_inline)) __STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
\r
515 __ASM volatile ("MSR basepri_max, %0" : : "r" (basePri) : "memory");
\r
520 \brief Get Fault Mask
\r
521 \details Returns the current value of the Fault Mask register.
\r
522 \return Fault Mask register value
\r
524 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_FAULTMASK(void)
\r
528 __ASM volatile ("MRS %0, faultmask" : "=r" (result) );
\r
533 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
535 \brief Get Fault Mask (non-secure)
\r
536 \details Returns the current value of the non-secure Fault Mask register when in secure state.
\r
537 \return Fault Mask register value
\r
539 __attribute__((always_inline)) __STATIC_INLINE uint32_t __TZ_get_FAULTMASK_NS(void)
\r
543 __ASM volatile ("MRS %0, faultmask_ns" : "=r" (result) );
\r
550 \brief Set Fault Mask
\r
551 \details Assigns the given value to the Fault Mask register.
\r
552 \param [in] faultMask Fault Mask value to set
\r
554 __attribute__((always_inline)) __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
\r
556 __ASM volatile ("MSR faultmask, %0" : : "r" (faultMask) : "memory");
\r
560 #if (defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3))
\r
562 \brief Set Fault Mask (non-secure)
\r
563 \details Assigns the given value to the non-secure Fault Mask register when in secure state.
\r
564 \param [in] faultMask Fault Mask value to set
\r
566 __attribute__((always_inline)) __STATIC_INLINE void __TZ_set_FAULTMASK_NS(uint32_t faultMask)
\r
568 __ASM volatile ("MSR faultmask_ns, %0" : : "r" (faultMask) : "memory");
\r
572 #endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
\r
573 (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
\r
574 (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */
\r
577 #if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \
\r
578 (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) )
\r
581 \brief Get Process Stack Pointer Limit
\r
582 \details Returns the current value of the Process Stack Pointer Limit (PSPLIM).
\r
583 \return PSPLIM Register value
\r
585 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_PSPLIM(void)
\r
587 register uint32_t result;
\r
589 __ASM volatile ("MRS %0, psplim" : "=r" (result) );
\r
594 #if ((defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) && \
\r
595 (defined (__ARM_ARCH_8M_MAIN__) && (__ARM_ARCH_8M_MAIN__ == 1)) )
\r
597 \brief Get Process Stack Pointer Limit (non-secure)
\r
598 \details Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state.
\r
599 \return PSPLIM Register value
\r
601 __attribute__((always_inline)) __STATIC_INLINE uint32_t __TZ_get_PSPLIM_NS(void)
\r
603 register uint32_t result;
\r
605 __ASM volatile ("MRS %0, psplim_ns" : "=r" (result) );
\r
612 \brief Set Process Stack Pointer Limit
\r
613 \details Assigns the given value to the Process Stack Pointer Limit (PSPLIM).
\r
614 \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set
\r
616 __attribute__((always_inline)) __STATIC_INLINE void __set_PSPLIM(uint32_t ProcStackPtrLimit)
\r
618 __ASM volatile ("MSR psplim, %0" : : "r" (ProcStackPtrLimit));
\r
622 #if ((defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) && \
\r
623 (defined (__ARM_ARCH_8M_MAIN__) && (__ARM_ARCH_8M_MAIN__ == 1)) )
\r
625 \brief Set Process Stack Pointer (non-secure)
\r
626 \details Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state.
\r
627 \param [in] ProcStackPtrLimit Process Stack Pointer Limit value to set
\r
629 __attribute__((always_inline)) __STATIC_INLINE void __TZ_set_PSPLIM_NS(uint32_t ProcStackPtrLimit)
\r
631 __ASM volatile ("MSR psplim_ns, %0\n" : : "r" (ProcStackPtrLimit));
\r
637 \brief Get Main Stack Pointer Limit
\r
638 \details Returns the current value of the Main Stack Pointer Limit (MSPLIM).
\r
639 \return MSPLIM Register value
\r
641 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_MSPLIM(void)
\r
643 register uint32_t result;
\r
645 __ASM volatile ("MRS %0, msplim" : "=r" (result) );
\r
651 #if ((defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) && \
\r
652 (defined (__ARM_ARCH_8M_MAIN__) && (__ARM_ARCH_8M_MAIN__ == 1)) )
\r
654 \brief Get Main Stack Pointer Limit (non-secure)
\r
655 \details Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state.
\r
656 \return MSPLIM Register value
\r
658 __attribute__((always_inline)) __STATIC_INLINE uint32_t __TZ_get_MSPLIM_NS(void)
\r
660 register uint32_t result;
\r
662 __ASM volatile ("MRS %0, msplim_ns" : "=r" (result) );
\r
669 \brief Set Main Stack Pointer Limit
\r
670 \details Assigns the given value to the Main Stack Pointer Limit (MSPLIM).
\r
671 \param [in] MainStackPtrLimit Main Stack Pointer Limit value to set
\r
673 __attribute__((always_inline)) __STATIC_INLINE void __set_MSPLIM(uint32_t MainStackPtrLimit)
\r
675 __ASM volatile ("MSR msplim, %0" : : "r" (MainStackPtrLimit));
\r
679 #if ((defined (__ARM_FEATURE_CMSE ) && (__ARM_FEATURE_CMSE == 3)) && \
\r
680 (defined (__ARM_ARCH_8M_MAIN__) && (__ARM_ARCH_8M_MAIN__ == 1)) )
\r
682 \brief Set Main Stack Pointer Limit (non-secure)
\r
683 \details Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state.
\r
684 \param [in] MainStackPtrLimit Main Stack Pointer value to set
\r
686 __attribute__((always_inline)) __STATIC_INLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit)
\r
688 __ASM volatile ("MSR msplim_ns, %0" : : "r" (MainStackPtrLimit));
\r
692 #endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \
\r
693 (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */
\r
696 #if ((defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
\r
697 (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) )
\r
701 \details Returns the current value of the Floating Point Status/Control register.
\r
702 \return Floating Point Status/Control register value
\r
704 __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_FPSCR(void)
\r
706 #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
\r
707 (defined (__FPU_USED ) && (__FPU_USED == 1U)) )
\r
708 #if __has_builtin(__builtin_arm_get_fpscr) || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2)
\r
709 /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */
\r
710 return __builtin_arm_get_fpscr();
\r
714 __ASM volatile ("VMRS %0, fpscr" : "=r" (result) );
\r
725 \details Assigns the given value to the Floating Point Status/Control register.
\r
726 \param [in] fpscr Floating Point Status/Control value to set
\r
728 __attribute__((always_inline)) __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
\r
730 #if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
\r
731 (defined (__FPU_USED ) && (__FPU_USED == 1U)) )
\r
732 #if __has_builtin(__builtin_arm_set_fpscr) || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2)
\r
733 /* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */
\r
734 __builtin_arm_set_fpscr(fpscr);
\r
736 __ASM volatile ("VMSR fpscr, %0" : : "r" (fpscr) : "vfpcc", "memory");
\r
743 #endif /* ((defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
\r
744 (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */
\r
748 /*@} end of CMSIS_Core_RegAccFunctions */
\r
751 /* ########################## Core Instruction Access ######################### */
\r
752 /** \defgroup CMSIS_Core_InstructionInterface CMSIS Core Instruction Interface
\r
753 Access to dedicated instructions
\r
757 /* Define macros for porting to both thumb1 and thumb2.
\r
758 * For thumb1, use low register (r0-r7), specified by constraint "l"
\r
759 * Otherwise, use general registers, specified by constraint "r" */
\r
760 #if defined (__thumb__) && !defined (__thumb2__)
\r
761 #define __CMSIS_GCC_OUT_REG(r) "=l" (r)
\r
762 #define __CMSIS_GCC_RW_REG(r) "+l" (r)
\r
763 #define __CMSIS_GCC_USE_REG(r) "l" (r)
\r
765 #define __CMSIS_GCC_OUT_REG(r) "=r" (r)
\r
766 #define __CMSIS_GCC_RW_REG(r) "+r" (r)
\r
767 #define __CMSIS_GCC_USE_REG(r) "r" (r)
\r
771 \brief No Operation
\r
772 \details No Operation does nothing. This instruction can be used for code alignment purposes.
\r
774 //__attribute__((always_inline)) __STATIC_INLINE void __NOP(void)
\r
776 // __ASM volatile ("nop");
\r
778 #define __NOP() __ASM volatile ("nop") /* This implementation generates debug information */
\r
781 \brief Wait For Interrupt
\r
782 \details Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs.
\r
784 //__attribute__((always_inline)) __STATIC_INLINE void __WFI(void)
\r
786 // __ASM volatile ("wfi");
\r
788 #define __WFI() __ASM volatile ("wfi") /* This implementation generates debug information */
\r
792 \brief Wait For Event
\r
793 \details Wait For Event is a hint instruction that permits the processor to enter
\r
794 a low-power state until one of a number of events occurs.
\r
796 //__attribute__((always_inline)) __STATIC_INLINE void __WFE(void)
\r
798 // __ASM volatile ("wfe");
\r
800 #define __WFE() __ASM volatile ("wfe") /* This implementation generates debug information */
\r
805 \details Send Event is a hint instruction. It causes an event to be signaled to the CPU.
\r
807 //__attribute__((always_inline)) __STATIC_INLINE void __SEV(void)
\r
809 // __ASM volatile ("sev");
\r
811 #define __SEV() __ASM volatile ("sev") /* This implementation generates debug information */
\r
815 \brief Instruction Synchronization Barrier
\r
816 \details Instruction Synchronization Barrier flushes the pipeline in the processor,
\r
817 so that all instructions following the ISB are fetched from cache or memory,
\r
818 after the instruction has been completed.
\r
820 __attribute__((always_inline)) __STATIC_INLINE void __ISB(void)
\r
822 __ASM volatile ("isb 0xF":::"memory");
\r
827 \brief Data Synchronization Barrier
\r
828 \details Acts as a special kind of Data Memory Barrier.
\r
829 It completes when all explicit memory accesses before this instruction complete.
\r
831 __attribute__((always_inline)) __STATIC_INLINE void __DSB(void)
\r
833 __ASM volatile ("dsb 0xF":::"memory");
\r
838 \brief Data Memory Barrier
\r
839 \details Ensures the apparent order of the explicit memory operations before
\r
840 and after the instruction, without ensuring their completion.
\r
842 __attribute__((always_inline)) __STATIC_INLINE void __DMB(void)
\r
844 __ASM volatile ("dmb 0xF":::"memory");
\r
849 \brief Reverse byte order (32 bit)
\r
850 \details Reverses the byte order in integer value.
\r
851 \param [in] value Value to reverse
\r
852 \return Reversed value
\r
854 __attribute__((always_inline)) __STATIC_INLINE uint32_t __REV(uint32_t value)
\r
856 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
\r
857 return __builtin_bswap32(value);
\r
861 __ASM volatile ("rev %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
\r
868 \brief Reverse byte order (16 bit)
\r
869 \details Reverses the byte order in two unsigned short values.
\r
870 \param [in] value Value to reverse
\r
871 \return Reversed value
\r
873 __attribute__((always_inline)) __STATIC_INLINE uint32_t __REV16(uint32_t value)
\r
877 __ASM volatile ("rev16 %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
\r
883 \brief Reverse byte order in signed short value
\r
884 \details Reverses the byte order in a signed short value with sign extension to integer.
\r
885 \param [in] value Value to reverse
\r
886 \return Reversed value
\r
888 __attribute__((always_inline)) __STATIC_INLINE int32_t __REVSH(int32_t value)
\r
890 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
\r
891 return (short)__builtin_bswap16(value);
\r
895 __ASM volatile ("revsh %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
\r
902 \brief Rotate Right in unsigned value (32 bit)
\r
903 \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
\r
904 \param [in] op1 Value to rotate
\r
905 \param [in] op2 Number of Bits to rotate
\r
906 \return Rotated value
\r
908 __attribute__((always_inline)) __STATIC_INLINE uint32_t __ROR(uint32_t op1, uint32_t op2)
\r
910 return (op1 >> op2) | (op1 << (32U - op2));
\r
916 \details Causes the processor to enter Debug state.
\r
917 Debug tools can use this to investigate system state when the instruction at a particular address is reached.
\r
918 \param [in] value is ignored by the processor.
\r
919 If required, a debugger can use it to store additional information about the breakpoint.
\r
921 #define __BKPT(value) __ASM volatile ("bkpt "#value)
\r
925 \brief Reverse bit order of value
\r
926 \details Reverses the bit order of the given value.
\r
927 \param [in] value Value to reverse
\r
928 \return Reversed value
\r
930 __attribute__((always_inline)) __STATIC_INLINE uint32_t __RBIT(uint32_t value)
\r
934 #if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
\r
935 (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
\r
936 (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) )
\r
937 __ASM volatile ("rbit %0, %1" : "=r" (result) : "r" (value) );
\r
939 int32_t s = (4 /*sizeof(v)*/ * 8) - 1; /* extra shift needed at end */
\r
941 result = value; /* r will be reversed bits of v; first get LSB of v */
\r
942 for (value >>= 1U; value; value >>= 1U)
\r
945 result |= value & 1U;
\r
948 result <<= s; /* shift when v's highest bits are zero */
\r
955 \brief Count leading zeros
\r
956 \details Counts the number of leading zeros of a data value.
\r
957 \param [in] value Value to count the leading zeros
\r
958 \return number of leading zeros in value
\r
960 #define __CLZ __builtin_clz
\r
963 #if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
\r
964 (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
\r
965 (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \
\r
966 (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) )
\r
968 \brief LDR Exclusive (8 bit)
\r
969 \details Executes a exclusive LDR instruction for 8 bit value.
\r
970 \param [in] ptr Pointer to data
\r
971 \return value of type uint8_t at (*ptr)
\r
973 __attribute__((always_inline)) __STATIC_INLINE uint8_t __LDREXB(volatile uint8_t *addr)
\r
977 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
\r
978 __ASM volatile ("ldrexb %0, %1" : "=r" (result) : "Q" (*addr) );
\r
980 /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not
\r
981 accepted by assembler. So has to use following less efficient pattern.
\r
983 __ASM volatile ("ldrexb %0, [%1]" : "=r" (result) : "r" (addr) : "memory" );
\r
985 return ((uint8_t) result); /* Add explicit type cast here */
\r
990 \brief LDR Exclusive (16 bit)
\r
991 \details Executes a exclusive LDR instruction for 16 bit values.
\r
992 \param [in] ptr Pointer to data
\r
993 \return value of type uint16_t at (*ptr)
\r
995 __attribute__((always_inline)) __STATIC_INLINE uint16_t __LDREXH(volatile uint16_t *addr)
\r
999 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
\r
1000 __ASM volatile ("ldrexh %0, %1" : "=r" (result) : "Q" (*addr) );
\r
1002 /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not
\r
1003 accepted by assembler. So has to use following less efficient pattern.
\r
1005 __ASM volatile ("ldrexh %0, [%1]" : "=r" (result) : "r" (addr) : "memory" );
\r
1007 return ((uint16_t) result); /* Add explicit type cast here */
\r
1012 \brief LDR Exclusive (32 bit)
\r
1013 \details Executes a exclusive LDR instruction for 32 bit values.
\r
1014 \param [in] ptr Pointer to data
\r
1015 \return value of type uint32_t at (*ptr)
\r
1017 __attribute__((always_inline)) __STATIC_INLINE uint32_t __LDREXW(volatile uint32_t *addr)
\r
1021 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) );
\r
1027 \brief STR Exclusive (8 bit)
\r
1028 \details Executes a exclusive STR instruction for 8 bit values.
\r
1029 \param [in] value Value to store
\r
1030 \param [in] ptr Pointer to location
\r
1031 \return 0 Function succeeded
\r
1032 \return 1 Function failed
\r
1034 __attribute__((always_inline)) __STATIC_INLINE uint32_t __STREXB(uint8_t value, volatile uint8_t *addr)
\r
1038 __ASM volatile ("strexb %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" ((uint32_t)value) );
\r
1044 \brief STR Exclusive (16 bit)
\r
1045 \details Executes a exclusive STR instruction for 16 bit values.
\r
1046 \param [in] value Value to store
\r
1047 \param [in] ptr Pointer to location
\r
1048 \return 0 Function succeeded
\r
1049 \return 1 Function failed
\r
1051 __attribute__((always_inline)) __STATIC_INLINE uint32_t __STREXH(uint16_t value, volatile uint16_t *addr)
\r
1055 __ASM volatile ("strexh %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" ((uint32_t)value) );
\r
1061 \brief STR Exclusive (32 bit)
\r
1062 \details Executes a exclusive STR instruction for 32 bit values.
\r
1063 \param [in] value Value to store
\r
1064 \param [in] ptr Pointer to location
\r
1065 \return 0 Function succeeded
\r
1066 \return 1 Function failed
\r
1068 __attribute__((always_inline)) __STATIC_INLINE uint32_t __STREXW(uint32_t value, volatile uint32_t *addr)
\r
1072 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
\r
1078 \brief Remove the exclusive lock
\r
1079 \details Removes the exclusive lock which is created by LDREX.
\r
1081 __attribute__((always_inline)) __STATIC_INLINE void __CLREX(void)
\r
1083 __ASM volatile ("clrex" ::: "memory");
\r
1086 #endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
\r
1087 (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
\r
1088 (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \
\r
1089 (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */
\r
1092 #if ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
\r
1093 (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
\r
1094 (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) )
\r
1096 \brief Signed Saturate
\r
1097 \details Saturates a signed value.
\r
1098 \param [in] value Value to be saturated
\r
1099 \param [in] sat Bit position to saturate to (1..32)
\r
1100 \return Saturated value
\r
1102 #define __SSAT(ARG1,ARG2) \
\r
1104 int32_t __RES, __ARG1 = (ARG1); \
\r
1105 __ASM ("ssat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \
\r
1111 \brief Unsigned Saturate
\r
1112 \details Saturates an unsigned value.
\r
1113 \param [in] value Value to be saturated
\r
1114 \param [in] sat Bit position to saturate to (0..31)
\r
1115 \return Saturated value
\r
1117 #define __USAT(ARG1,ARG2) \
\r
1119 uint32_t __RES, __ARG1 = (ARG1); \
\r
1120 __ASM ("usat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \
\r
1126 \brief Rotate Right with Extend (32 bit)
\r
1127 \details Moves each bit of a bitstring right by one bit.
\r
1128 The carry input is shifted in at the left end of the bitstring.
\r
1129 \param [in] value Value to rotate
\r
1130 \return Rotated value
\r
1132 __attribute__((always_inline)) __STATIC_INLINE uint32_t __RRX(uint32_t value)
\r
1136 __ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
\r
1142 \brief LDRT Unprivileged (8 bit)
\r
1143 \details Executes a Unprivileged LDRT instruction for 8 bit value.
\r
1144 \param [in] ptr Pointer to data
\r
1145 \return value of type uint8_t at (*ptr)
\r
1147 __attribute__((always_inline)) __STATIC_INLINE uint8_t __LDRBT(volatile uint8_t *ptr)
\r
1151 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
\r
1152 __ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) );
\r
1154 /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not
\r
1155 accepted by assembler. So has to use following less efficient pattern.
\r
1157 __ASM volatile ("ldrbt %0, [%1]" : "=r" (result) : "r" (ptr) : "memory" );
\r
1159 return ((uint8_t) result); /* Add explicit type cast here */
\r
1164 \brief LDRT Unprivileged (16 bit)
\r
1165 \details Executes a Unprivileged LDRT instruction for 16 bit values.
\r
1166 \param [in] ptr Pointer to data
\r
1167 \return value of type uint16_t at (*ptr)
\r
1169 __attribute__((always_inline)) __STATIC_INLINE uint16_t __LDRHT(volatile uint16_t *ptr)
\r
1173 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
\r
1174 __ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) );
\r
1176 /* Prior to GCC 4.8, "Q" will be expanded to [rx, #0] which is not
\r
1177 accepted by assembler. So has to use following less efficient pattern.
\r
1179 __ASM volatile ("ldrht %0, [%1]" : "=r" (result) : "r" (ptr) : "memory" );
\r
1181 return ((uint16_t) result); /* Add explicit type cast here */
\r
1186 \brief LDRT Unprivileged (32 bit)
\r
1187 \details Executes a Unprivileged LDRT instruction for 32 bit values.
\r
1188 \param [in] ptr Pointer to data
\r
1189 \return value of type uint32_t at (*ptr)
\r
1191 __attribute__((always_inline)) __STATIC_INLINE uint32_t __LDRT(volatile uint32_t *ptr)
\r
1195 __ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) );
\r
1201 \brief STRT Unprivileged (8 bit)
\r
1202 \details Executes a Unprivileged STRT instruction for 8 bit values.
\r
1203 \param [in] value Value to store
\r
1204 \param [in] ptr Pointer to location
\r
1206 __attribute__((always_inline)) __STATIC_INLINE void __STRBT(uint8_t value, volatile uint8_t *ptr)
\r
1208 __ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) );
\r
1213 \brief STRT Unprivileged (16 bit)
\r
1214 \details Executes a Unprivileged STRT instruction for 16 bit values.
\r
1215 \param [in] value Value to store
\r
1216 \param [in] ptr Pointer to location
\r
1218 __attribute__((always_inline)) __STATIC_INLINE void __STRHT(uint16_t value, volatile uint16_t *ptr)
\r
1220 __ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) );
\r
1225 \brief STRT Unprivileged (32 bit)
\r
1226 \details Executes a Unprivileged STRT instruction for 32 bit values.
\r
1227 \param [in] value Value to store
\r
1228 \param [in] ptr Pointer to location
\r
1230 __attribute__((always_inline)) __STATIC_INLINE void __STRT(uint32_t value, volatile uint32_t *ptr)
\r
1232 __ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) );
\r
1235 #endif /* ((defined (__ARM_ARCH_7M__ ) && (__ARM_ARCH_7M__ == 1)) || \
\r
1236 (defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
\r
1237 (defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */
\r
1240 #if ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \
\r
1241 (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) )
\r
1243 \brief Load-Acquire (8 bit)
\r
1244 \details Executes a LDAB instruction for 8 bit value.
\r
1245 \param [in] ptr Pointer to data
\r
1246 \return value of type uint8_t at (*ptr)
\r
1248 __attribute__((always_inline)) __STATIC_INLINE uint8_t __LDAB(volatile uint8_t *ptr)
\r
1252 __ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) );
\r
1253 return ((uint8_t) result);
\r
1258 \brief Load-Acquire (16 bit)
\r
1259 \details Executes a LDAH instruction for 16 bit values.
\r
1260 \param [in] ptr Pointer to data
\r
1261 \return value of type uint16_t at (*ptr)
\r
1263 __attribute__((always_inline)) __STATIC_INLINE uint16_t __LDAH(volatile uint16_t *ptr)
\r
1267 __ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) );
\r
1268 return ((uint16_t) result);
\r
1273 \brief Load-Acquire (32 bit)
\r
1274 \details Executes a LDA instruction for 32 bit values.
\r
1275 \param [in] ptr Pointer to data
\r
1276 \return value of type uint32_t at (*ptr)
\r
1278 __attribute__((always_inline)) __STATIC_INLINE uint32_t __LDA(volatile uint32_t *ptr)
\r
1282 __ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) );
\r
1288 \brief Store-Release (8 bit)
\r
1289 \details Executes a STLB instruction for 8 bit values.
\r
1290 \param [in] value Value to store
\r
1291 \param [in] ptr Pointer to location
\r
1293 __attribute__((always_inline)) __STATIC_INLINE void __STLB(uint8_t value, volatile uint8_t *ptr)
\r
1295 __ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) );
\r
1300 \brief Store-Release (16 bit)
\r
1301 \details Executes a STLH instruction for 16 bit values.
\r
1302 \param [in] value Value to store
\r
1303 \param [in] ptr Pointer to location
\r
1305 __attribute__((always_inline)) __STATIC_INLINE void __STLH(uint16_t value, volatile uint16_t *ptr)
\r
1307 __ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) );
\r
1312 \brief Store-Release (32 bit)
\r
1313 \details Executes a STL instruction for 32 bit values.
\r
1314 \param [in] value Value to store
\r
1315 \param [in] ptr Pointer to location
\r
1317 __attribute__((always_inline)) __STATIC_INLINE void __STL(uint32_t value, volatile uint32_t *ptr)
\r
1319 __ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) );
\r
1324 \brief Load-Acquire Exclusive (8 bit)
\r
1325 \details Executes a LDAB exclusive instruction for 8 bit value.
\r
1326 \param [in] ptr Pointer to data
\r
1327 \return value of type uint8_t at (*ptr)
\r
1329 __attribute__((always_inline)) __STATIC_INLINE uint8_t __LDAEXB(volatile uint8_t *ptr)
\r
1333 __ASM volatile ("ldaexb %0, %1" : "=r" (result) : "Q" (*ptr) );
\r
1334 return ((uint8_t) result);
\r
1339 \brief Load-Acquire Exclusive (16 bit)
\r
1340 \details Executes a LDAH exclusive instruction for 16 bit values.
\r
1341 \param [in] ptr Pointer to data
\r
1342 \return value of type uint16_t at (*ptr)
\r
1344 __attribute__((always_inline)) __STATIC_INLINE uint16_t __LDAEXH(volatile uint16_t *ptr)
\r
1348 __ASM volatile ("ldaexh %0, %1" : "=r" (result) : "Q" (*ptr) );
\r
1349 return ((uint16_t) result);
\r
1354 \brief Load-Acquire Exclusive (32 bit)
\r
1355 \details Executes a LDA exclusive instruction for 32 bit values.
\r
1356 \param [in] ptr Pointer to data
\r
1357 \return value of type uint32_t at (*ptr)
\r
1359 __attribute__((always_inline)) __STATIC_INLINE uint32_t __LDAEX(volatile uint32_t *ptr)
\r
1363 __ASM volatile ("ldaex %0, %1" : "=r" (result) : "Q" (*ptr) );
\r
1369 \brief Store-Release Exclusive (8 bit)
\r
1370 \details Executes a STLB exclusive instruction for 8 bit values.
\r
1371 \param [in] value Value to store
\r
1372 \param [in] ptr Pointer to location
\r
1373 \return 0 Function succeeded
\r
1374 \return 1 Function failed
\r
1376 __attribute__((always_inline)) __STATIC_INLINE uint32_t __STLEXB(uint8_t value, volatile uint8_t *ptr)
\r
1380 __ASM volatile ("stlexb %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) );
\r
1386 \brief Store-Release Exclusive (16 bit)
\r
1387 \details Executes a STLH exclusive instruction for 16 bit values.
\r
1388 \param [in] value Value to store
\r
1389 \param [in] ptr Pointer to location
\r
1390 \return 0 Function succeeded
\r
1391 \return 1 Function failed
\r
1393 __attribute__((always_inline)) __STATIC_INLINE uint32_t __STLEXH(uint16_t value, volatile uint16_t *ptr)
\r
1397 __ASM volatile ("stlexh %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) );
\r
1403 \brief Store-Release Exclusive (32 bit)
\r
1404 \details Executes a STL exclusive instruction for 32 bit values.
\r
1405 \param [in] value Value to store
\r
1406 \param [in] ptr Pointer to location
\r
1407 \return 0 Function succeeded
\r
1408 \return 1 Function failed
\r
1410 __attribute__((always_inline)) __STATIC_INLINE uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr)
\r
1414 __ASM volatile ("stlex %0, %2, %1" : "=&r" (result), "=Q" (*ptr) : "r" ((uint32_t)value) );
\r
1418 #endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \
\r
1419 (defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */
\r
1421 /*@}*/ /* end of group CMSIS_Core_InstructionInterface */
\r
1424 /* ################### Compiler specific Intrinsics ########################### */
\r
1425 /** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
\r
1426 Access to dedicated SIMD instructions
\r
1430 #if (__ARM_FEATURE_DSP == 1) /* ToDo ARMCLANG: This should be ARCH >= ARMv7-M + SIMD */
\r
1432 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SADD8(uint32_t op1, uint32_t op2)
\r
1436 __ASM volatile ("sadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1440 __attribute__((always_inline)) __STATIC_INLINE uint32_t __QADD8(uint32_t op1, uint32_t op2)
\r
1444 __ASM volatile ("qadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1448 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SHADD8(uint32_t op1, uint32_t op2)
\r
1452 __ASM volatile ("shadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1456 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UADD8(uint32_t op1, uint32_t op2)
\r
1460 __ASM volatile ("uadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1464 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UQADD8(uint32_t op1, uint32_t op2)
\r
1468 __ASM volatile ("uqadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1472 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UHADD8(uint32_t op1, uint32_t op2)
\r
1476 __ASM volatile ("uhadd8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1481 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SSUB8(uint32_t op1, uint32_t op2)
\r
1485 __ASM volatile ("ssub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1489 __attribute__((always_inline)) __STATIC_INLINE uint32_t __QSUB8(uint32_t op1, uint32_t op2)
\r
1493 __ASM volatile ("qsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1497 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SHSUB8(uint32_t op1, uint32_t op2)
\r
1501 __ASM volatile ("shsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1505 __attribute__((always_inline)) __STATIC_INLINE uint32_t __USUB8(uint32_t op1, uint32_t op2)
\r
1509 __ASM volatile ("usub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1513 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UQSUB8(uint32_t op1, uint32_t op2)
\r
1517 __ASM volatile ("uqsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1521 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UHSUB8(uint32_t op1, uint32_t op2)
\r
1525 __ASM volatile ("uhsub8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1530 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SADD16(uint32_t op1, uint32_t op2)
\r
1534 __ASM volatile ("sadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1538 __attribute__((always_inline)) __STATIC_INLINE uint32_t __QADD16(uint32_t op1, uint32_t op2)
\r
1542 __ASM volatile ("qadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1546 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SHADD16(uint32_t op1, uint32_t op2)
\r
1550 __ASM volatile ("shadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1554 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UADD16(uint32_t op1, uint32_t op2)
\r
1558 __ASM volatile ("uadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1562 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UQADD16(uint32_t op1, uint32_t op2)
\r
1566 __ASM volatile ("uqadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1570 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UHADD16(uint32_t op1, uint32_t op2)
\r
1574 __ASM volatile ("uhadd16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1578 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SSUB16(uint32_t op1, uint32_t op2)
\r
1582 __ASM volatile ("ssub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1586 __attribute__((always_inline)) __STATIC_INLINE uint32_t __QSUB16(uint32_t op1, uint32_t op2)
\r
1590 __ASM volatile ("qsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1594 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SHSUB16(uint32_t op1, uint32_t op2)
\r
1598 __ASM volatile ("shsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1602 __attribute__((always_inline)) __STATIC_INLINE uint32_t __USUB16(uint32_t op1, uint32_t op2)
\r
1606 __ASM volatile ("usub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1610 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UQSUB16(uint32_t op1, uint32_t op2)
\r
1614 __ASM volatile ("uqsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1618 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UHSUB16(uint32_t op1, uint32_t op2)
\r
1622 __ASM volatile ("uhsub16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1626 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SASX(uint32_t op1, uint32_t op2)
\r
1630 __ASM volatile ("sasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1634 __attribute__((always_inline)) __STATIC_INLINE uint32_t __QASX(uint32_t op1, uint32_t op2)
\r
1638 __ASM volatile ("qasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1642 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SHASX(uint32_t op1, uint32_t op2)
\r
1646 __ASM volatile ("shasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1650 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UASX(uint32_t op1, uint32_t op2)
\r
1654 __ASM volatile ("uasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1658 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UQASX(uint32_t op1, uint32_t op2)
\r
1662 __ASM volatile ("uqasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1666 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UHASX(uint32_t op1, uint32_t op2)
\r
1670 __ASM volatile ("uhasx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1674 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SSAX(uint32_t op1, uint32_t op2)
\r
1678 __ASM volatile ("ssax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1682 __attribute__((always_inline)) __STATIC_INLINE uint32_t __QSAX(uint32_t op1, uint32_t op2)
\r
1686 __ASM volatile ("qsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1690 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SHSAX(uint32_t op1, uint32_t op2)
\r
1694 __ASM volatile ("shsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1698 __attribute__((always_inline)) __STATIC_INLINE uint32_t __USAX(uint32_t op1, uint32_t op2)
\r
1702 __ASM volatile ("usax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1706 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UQSAX(uint32_t op1, uint32_t op2)
\r
1710 __ASM volatile ("uqsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1714 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UHSAX(uint32_t op1, uint32_t op2)
\r
1718 __ASM volatile ("uhsax %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1722 __attribute__((always_inline)) __STATIC_INLINE uint32_t __USAD8(uint32_t op1, uint32_t op2)
\r
1726 __ASM volatile ("usad8 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1730 __attribute__((always_inline)) __STATIC_INLINE uint32_t __USADA8(uint32_t op1, uint32_t op2, uint32_t op3)
\r
1734 __ASM volatile ("usada8 %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
\r
1738 #define __SSAT16(ARG1,ARG2) \
\r
1740 int32_t __RES, __ARG1 = (ARG1); \
\r
1741 __ASM ("ssat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \
\r
1745 #define __USAT16(ARG1,ARG2) \
\r
1747 uint32_t __RES, __ARG1 = (ARG1); \
\r
1748 __ASM ("usat16 %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \
\r
1752 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UXTB16(uint32_t op1)
\r
1756 __ASM volatile ("uxtb16 %0, %1" : "=r" (result) : "r" (op1));
\r
1760 __attribute__((always_inline)) __STATIC_INLINE uint32_t __UXTAB16(uint32_t op1, uint32_t op2)
\r
1764 __ASM volatile ("uxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1768 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SXTB16(uint32_t op1)
\r
1772 __ASM volatile ("sxtb16 %0, %1" : "=r" (result) : "r" (op1));
\r
1776 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SXTAB16(uint32_t op1, uint32_t op2)
\r
1780 __ASM volatile ("sxtab16 %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1784 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SMUAD (uint32_t op1, uint32_t op2)
\r
1788 __ASM volatile ("smuad %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1792 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SMUADX (uint32_t op1, uint32_t op2)
\r
1796 __ASM volatile ("smuadx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1800 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SMLAD (uint32_t op1, uint32_t op2, uint32_t op3)
\r
1804 __ASM volatile ("smlad %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
\r
1808 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SMLADX (uint32_t op1, uint32_t op2, uint32_t op3)
\r
1812 __ASM volatile ("smladx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
\r
1816 __attribute__((always_inline)) __STATIC_INLINE uint64_t __SMLALD (uint32_t op1, uint32_t op2, uint64_t acc)
\r
1824 #ifndef __ARMEB__ /* Little endian */
\r
1825 __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) );
\r
1826 #else /* Big endian */
\r
1827 __ASM volatile ("smlald %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) );
\r
1833 __attribute__((always_inline)) __STATIC_INLINE uint64_t __SMLALDX (uint32_t op1, uint32_t op2, uint64_t acc)
\r
1841 #ifndef __ARMEB__ /* Little endian */
\r
1842 __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) );
\r
1843 #else /* Big endian */
\r
1844 __ASM volatile ("smlaldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) );
\r
1850 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SMUSD (uint32_t op1, uint32_t op2)
\r
1854 __ASM volatile ("smusd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1858 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SMUSDX (uint32_t op1, uint32_t op2)
\r
1862 __ASM volatile ("smusdx %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1866 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SMLSD (uint32_t op1, uint32_t op2, uint32_t op3)
\r
1870 __ASM volatile ("smlsd %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
\r
1874 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SMLSDX (uint32_t op1, uint32_t op2, uint32_t op3)
\r
1878 __ASM volatile ("smlsdx %0, %1, %2, %3" : "=r" (result) : "r" (op1), "r" (op2), "r" (op3) );
\r
1882 __attribute__((always_inline)) __STATIC_INLINE uint64_t __SMLSLD (uint32_t op1, uint32_t op2, uint64_t acc)
\r
1890 #ifndef __ARMEB__ /* Little endian */
\r
1891 __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) );
\r
1892 #else /* Big endian */
\r
1893 __ASM volatile ("smlsld %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) );
\r
1899 __attribute__((always_inline)) __STATIC_INLINE uint64_t __SMLSLDX (uint32_t op1, uint32_t op2, uint64_t acc)
\r
1907 #ifndef __ARMEB__ /* Little endian */
\r
1908 __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[0]), "=r" (llr.w32[1]): "r" (op1), "r" (op2) , "0" (llr.w32[0]), "1" (llr.w32[1]) );
\r
1909 #else /* Big endian */
\r
1910 __ASM volatile ("smlsldx %0, %1, %2, %3" : "=r" (llr.w32[1]), "=r" (llr.w32[0]): "r" (op1), "r" (op2) , "0" (llr.w32[1]), "1" (llr.w32[0]) );
\r
1916 __attribute__((always_inline)) __STATIC_INLINE uint32_t __SEL (uint32_t op1, uint32_t op2)
\r
1920 __ASM volatile ("sel %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1924 __attribute__((always_inline)) __STATIC_INLINE int32_t __QADD( int32_t op1, int32_t op2)
\r
1928 __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1932 __attribute__((always_inline)) __STATIC_INLINE int32_t __QSUB( int32_t op1, int32_t op2)
\r
1936 __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
\r
1941 #define __PKHBT(ARG1,ARG2,ARG3) \
\r
1943 uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \
\r
1944 __ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \
\r
1948 #define __PKHTB(ARG1,ARG2,ARG3) \
\r
1950 uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \
\r
1952 __ASM ("pkhtb %0, %1, %2" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2) ); \
\r
1954 __ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \
\r
1959 #define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \
\r
1960 ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) )
\r
1962 #define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \
\r
1963 ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) )
\r
1965 __attribute__((always_inline)) __STATIC_INLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3)
\r
1969 __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) );
\r
1973 #endif /* (__ARM_FEATURE_DSP == 1) */
\r
1974 /*@} end of group CMSIS_SIMD_intrinsics */
\r
1977 #pragma GCC diagnostic pop
\r
1979 #endif /* __CMSIS_GCC_H */
\r