cmsis_armclang.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  1. /**************************************************************************//**
  2. * @file cmsis_armclang.h
  3. * @brief CMSIS compiler specific macros, functions, instructions
  4. * @version V1.1.2
  5. * @date 30. July 2019
  6. ******************************************************************************/
  7. /*
  8. * Copyright (c) 2009-2019 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. * 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. #ifndef __CMSIS_ARMCLANG_H
  25. #define __CMSIS_ARMCLANG_H
  26. #pragma clang system_header /* treat file as system include file */
  27. #ifndef __ARM_COMPAT_H
  28. #include <arm_compat.h> /* Compatibility header for Arm Compiler 5 intrinsics */
  29. #endif
  30. /* CMSIS compiler specific defines */
  31. #ifndef __ASM
  32. #define __ASM __asm
  33. #endif
  34. #ifndef __INLINE
  35. #define __INLINE __inline
  36. #endif
  37. #ifndef __FORCEINLINE
  38. #define __FORCEINLINE __attribute__((always_inline))
  39. #endif
  40. #ifndef __STATIC_INLINE
  41. #define __STATIC_INLINE static __inline
  42. #endif
  43. #ifndef __STATIC_FORCEINLINE
  44. #define __STATIC_FORCEINLINE __attribute__((always_inline)) static __inline
  45. #endif
  46. #ifndef __NO_RETURN
  47. #define __NO_RETURN __attribute__((__noreturn__))
  48. #endif
  49. #ifndef CMSIS_DEPRECATED
  50. #define CMSIS_DEPRECATED __attribute__((deprecated))
  51. #endif
  52. #ifndef __USED
  53. #define __USED __attribute__((used))
  54. #endif
  55. #ifndef __WEAK
  56. #define __WEAK __attribute__((weak))
  57. #endif
  58. #ifndef __PACKED
  59. #define __PACKED __attribute__((packed, aligned(1)))
  60. #endif
  61. #ifndef __PACKED_STRUCT
  62. #define __PACKED_STRUCT struct __attribute__((packed, aligned(1)))
  63. #endif
  64. #ifndef __UNALIGNED_UINT16_WRITE
  65. #pragma clang diagnostic push
  66. #pragma clang diagnostic ignored "-Wpacked"
  67. /*lint -esym(9058, T_UINT16_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_WRITE */
  68. __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
  69. #pragma clang diagnostic pop
  70. #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
  71. #endif
  72. #ifndef __UNALIGNED_UINT16_READ
  73. #pragma clang diagnostic push
  74. #pragma clang diagnostic ignored "-Wpacked"
  75. /*lint -esym(9058, T_UINT16_READ)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT16_READ */
  76. __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
  77. #pragma clang diagnostic pop
  78. #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
  79. #endif
  80. #ifndef __UNALIGNED_UINT32_WRITE
  81. #pragma clang diagnostic push
  82. #pragma clang diagnostic ignored "-Wpacked"
  83. /*lint -esym(9058, T_UINT32_WRITE)*/ /* disable MISRA 2012 Rule 2.4 for T_UINT32_WRITE */
  84. __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
  85. #pragma clang diagnostic pop
  86. #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
  87. #endif
  88. #ifndef __UNALIGNED_UINT32_READ
  89. #pragma clang diagnostic push
  90. #pragma clang diagnostic ignored "-Wpacked"
  91. __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
  92. #pragma clang diagnostic pop
  93. #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
  94. #endif
  95. #ifndef __ALIGNED
  96. #define __ALIGNED(x) __attribute__((aligned(x)))
  97. #endif
  98. #ifndef __PACKED
  99. #define __PACKED __attribute__((packed))
  100. #endif
  101. #ifndef __COMPILER_BARRIER
  102. #define __COMPILER_BARRIER() __ASM volatile("":::"memory")
  103. #endif
  104. /* ########################## Core Instruction Access ######################### */
  105. /**
  106. \brief No Operation
  107. */
  108. #define __NOP __builtin_arm_nop
  109. /**
  110. \brief Wait For Interrupt
  111. */
  112. #define __WFI __builtin_arm_wfi
  113. /**
  114. \brief Wait For Event
  115. */
  116. #define __WFE __builtin_arm_wfe
  117. /**
  118. \brief Send Event
  119. */
  120. #define __SEV __builtin_arm_sev
  121. /**
  122. \brief Instruction Synchronization Barrier
  123. */
  124. #define __ISB() __builtin_arm_isb(0xF)
  125. /**
  126. \brief Data Synchronization Barrier
  127. */
  128. #define __DSB() __builtin_arm_dsb(0xF)
  129. /**
  130. \brief Data Memory Barrier
  131. */
  132. #define __DMB() __builtin_arm_dmb(0xF)
  133. /**
  134. \brief Reverse byte order (32 bit)
  135. \details Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412.
  136. \param [in] value Value to reverse
  137. \return Reversed value
  138. */
  139. #define __REV(value) __builtin_bswap32(value)
  140. /**
  141. \brief Reverse byte order (16 bit)
  142. \details Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856.
  143. \param [in] value Value to reverse
  144. \return Reversed value
  145. */
  146. #define __REV16(value) __ROR(__REV(value), 16)
  147. /**
  148. \brief Reverse byte order (16 bit)
  149. \details Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000.
  150. \param [in] value Value to reverse
  151. \return Reversed value
  152. */
  153. #define __REVSH(value) (int16_t)__builtin_bswap16(value)
  154. /**
  155. \brief Rotate Right in unsigned value (32 bit)
  156. \details Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.
  157. \param [in] op1 Value to rotate
  158. \param [in] op2 Number of Bits to rotate
  159. \return Rotated value
  160. */
  161. __STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2)
  162. {
  163. op2 %= 32U;
  164. if (op2 == 0U)
  165. {
  166. return op1;
  167. }
  168. return (op1 >> op2) | (op1 << (32U - op2));
  169. }
  170. /**
  171. \brief Breakpoint
  172. \param [in] value is ignored by the processor.
  173. If required, a debugger can use it to store additional information about the breakpoint.
  174. */
  175. #define __BKPT(value) __ASM volatile ("bkpt "#value)
  176. /**
  177. \brief Reverse bit order of value
  178. \param [in] value Value to reverse
  179. \return Reversed value
  180. */
  181. #define __RBIT __builtin_arm_rbit
  182. /**
  183. \brief Count leading zeros
  184. \param [in] value Value to count the leading zeros
  185. \return number of leading zeros in value
  186. */
  187. __STATIC_FORCEINLINE uint8_t __CLZ(uint32_t value)
  188. {
  189. /* Even though __builtin_clz produces a CLZ instruction on ARM, formally
  190. __builtin_clz(0) is undefined behaviour, so handle this case specially.
  191. This guarantees ARM-compatible results if happening to compile on a non-ARM
  192. target, and ensures the compiler doesn't decide to activate any
  193. optimisations using the logic "value was passed to __builtin_clz, so it
  194. is non-zero".
  195. ARM Compiler 6.10 and possibly earlier will optimise this test away, leaving a
  196. single CLZ instruction.
  197. */
  198. if (value == 0U)
  199. {
  200. return 32U;
  201. }
  202. return __builtin_clz(value);
  203. }
  204. /**
  205. \brief LDR Exclusive (8 bit)
  206. \details Executes a exclusive LDR instruction for 8 bit value.
  207. \param [in] ptr Pointer to data
  208. \return value of type uint8_t at (*ptr)
  209. */
  210. #define __LDREXB (uint8_t)__builtin_arm_ldrex
  211. /**
  212. \brief LDR Exclusive (16 bit)
  213. \details Executes a exclusive LDR instruction for 16 bit values.
  214. \param [in] ptr Pointer to data
  215. \return value of type uint16_t at (*ptr)
  216. */
  217. #define __LDREXH (uint16_t)__builtin_arm_ldrex
  218. /**
  219. \brief LDR Exclusive (32 bit)
  220. \details Executes a exclusive LDR instruction for 32 bit values.
  221. \param [in] ptr Pointer to data
  222. \return value of type uint32_t at (*ptr)
  223. */
  224. #define __LDREXW (uint32_t)__builtin_arm_ldrex
  225. /**
  226. \brief STR Exclusive (8 bit)
  227. \details Executes a exclusive STR instruction for 8 bit values.
  228. \param [in] value Value to store
  229. \param [in] ptr Pointer to location
  230. \return 0 Function succeeded
  231. \return 1 Function failed
  232. */
  233. #define __STREXB (uint32_t)__builtin_arm_strex
  234. /**
  235. \brief STR Exclusive (16 bit)
  236. \details Executes a exclusive STR instruction for 16 bit values.
  237. \param [in] value Value to store
  238. \param [in] ptr Pointer to location
  239. \return 0 Function succeeded
  240. \return 1 Function failed
  241. */
  242. #define __STREXH (uint32_t)__builtin_arm_strex
  243. /**
  244. \brief STR Exclusive (32 bit)
  245. \details Executes a exclusive STR instruction for 32 bit values.
  246. \param [in] value Value to store
  247. \param [in] ptr Pointer to location
  248. \return 0 Function succeeded
  249. \return 1 Function failed
  250. */
  251. #define __STREXW (uint32_t)__builtin_arm_strex
  252. /**
  253. \brief Remove the exclusive lock
  254. \details Removes the exclusive lock which is created by LDREX.
  255. */
  256. #define __CLREX __builtin_arm_clrex
  257. /**
  258. \brief Signed Saturate
  259. \details Saturates a signed value.
  260. \param [in] value Value to be saturated
  261. \param [in] sat Bit position to saturate to (1..32)
  262. \return Saturated value
  263. */
  264. #define __SSAT __builtin_arm_ssat
  265. /**
  266. \brief Unsigned Saturate
  267. \details Saturates an unsigned value.
  268. \param [in] value Value to be saturated
  269. \param [in] sat Bit position to saturate to (0..31)
  270. \return Saturated value
  271. */
  272. #define __USAT __builtin_arm_usat
  273. /* ################### Compiler specific Intrinsics ########################### */
  274. /** \defgroup CMSIS_SIMD_intrinsics CMSIS SIMD Intrinsics
  275. Access to dedicated SIMD instructions
  276. @{
  277. */
  278. #if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
  279. #define __SADD8 __builtin_arm_sadd8
  280. #define __SADD16 __builtin_arm_sadd16
  281. #define __QADD8 __builtin_arm_qadd8
  282. #define __QSUB8 __builtin_arm_qsub8
  283. #define __QADD16 __builtin_arm_qadd16
  284. #define __SHADD16 __builtin_arm_shadd16
  285. #define __QSUB16 __builtin_arm_qsub16
  286. #define __SHSUB16 __builtin_arm_shsub16
  287. #define __QASX __builtin_arm_qasx
  288. #define __SHASX __builtin_arm_shasx
  289. #define __QSAX __builtin_arm_qsax
  290. #define __SHSAX __builtin_arm_shsax
  291. #define __SXTB16 __builtin_arm_sxtb16
  292. #define __SMUAD __builtin_arm_smuad
  293. #define __SMUADX __builtin_arm_smuadx
  294. #define __SMLAD __builtin_arm_smlad
  295. #define __SMLADX __builtin_arm_smladx
  296. #define __SMLALD __builtin_arm_smlald
  297. #define __SMLALDX __builtin_arm_smlaldx
  298. #define __SMUSD __builtin_arm_smusd
  299. #define __SMUSDX __builtin_arm_smusdx
  300. #define __SMLSDX __builtin_arm_smlsdx
  301. #define __USAT16 __builtin_arm_usat16
  302. #define __SSUB8 __builtin_arm_ssub8
  303. #define __SXTB16 __builtin_arm_sxtb16
  304. #define __SXTAB16 __builtin_arm_sxtab16
  305. __STATIC_FORCEINLINE int32_t __QADD( int32_t op1, int32_t op2)
  306. {
  307. int32_t result;
  308. __ASM volatile ("qadd %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
  309. return(result);
  310. }
  311. __STATIC_FORCEINLINE int32_t __QSUB( int32_t op1, int32_t op2)
  312. {
  313. int32_t result;
  314. __ASM volatile ("qsub %0, %1, %2" : "=r" (result) : "r" (op1), "r" (op2) );
  315. return(result);
  316. }
  317. #define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \
  318. ((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) )
  319. #define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \
  320. ((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) )
  321. __STATIC_FORCEINLINE int32_t __SMMLA (int32_t op1, int32_t op2, int32_t op3)
  322. {
  323. int32_t result;
  324. __ASM volatile ("smmla %0, %1, %2, %3" : "=r" (result): "r" (op1), "r" (op2), "r" (op3) );
  325. return(result);
  326. }
  327. #endif /* (__ARM_FEATURE_DSP == 1) */
  328. /* ########################### Core Function Access ########################### */
  329. /**
  330. \brief Get FPSCR
  331. \details Returns the current value of the Floating Point Status/Control register.
  332. \return Floating Point Status/Control register value
  333. */
  334. #define __get_FPSCR __builtin_arm_get_fpscr
  335. /**
  336. \brief Set FPSCR
  337. \details Assigns the given value to the Floating Point Status/Control register.
  338. \param [in] fpscr Floating Point Status/Control value to set
  339. */
  340. #define __set_FPSCR __builtin_arm_set_fpscr
  341. /** \brief Get CPSR Register
  342. \return CPSR Register value
  343. */
  344. __STATIC_FORCEINLINE uint32_t __get_CPSR(void)
  345. {
  346. uint32_t result;
  347. __ASM volatile("MRS %0, cpsr" : "=r" (result) );
  348. return(result);
  349. }
  350. /** \brief Set CPSR Register
  351. \param [in] cpsr CPSR value to set
  352. */
  353. __STATIC_FORCEINLINE void __set_CPSR(uint32_t cpsr)
  354. {
  355. __ASM volatile ("MSR cpsr, %0" : : "r" (cpsr) : "cc", "memory");
  356. }
  357. /** \brief Get Mode
  358. \return Processor Mode
  359. */
  360. __STATIC_FORCEINLINE uint32_t __get_mode(void)
  361. {
  362. return (__get_CPSR() & 0x1FU);
  363. }
  364. /** \brief Set Mode
  365. \param [in] mode Mode value to set
  366. */
  367. __STATIC_FORCEINLINE void __set_mode(uint32_t mode)
  368. {
  369. __ASM volatile("MSR cpsr_c, %0" : : "r" (mode) : "memory");
  370. }
  371. /** \brief Get Stack Pointer
  372. \return Stack Pointer value
  373. */
  374. __STATIC_FORCEINLINE uint32_t __get_SP()
  375. {
  376. uint32_t result;
  377. __ASM volatile("MOV %0, sp" : "=r" (result) : : "memory");
  378. return result;
  379. }
  380. /** \brief Set Stack Pointer
  381. \param [in] stack Stack Pointer value to set
  382. */
  383. __STATIC_FORCEINLINE void __set_SP(uint32_t stack)
  384. {
  385. __ASM volatile("MOV sp, %0" : : "r" (stack) : "memory");
  386. }
  387. /** \brief Get USR/SYS Stack Pointer
  388. \return USR/SYS Stack Pointer value
  389. */
  390. __STATIC_FORCEINLINE uint32_t __get_SP_usr()
  391. {
  392. uint32_t cpsr;
  393. uint32_t result;
  394. __ASM volatile(
  395. "MRS %0, cpsr \n"
  396. "CPS #0x1F \n" // no effect in USR mode
  397. "MOV %1, sp \n"
  398. "MSR cpsr_c, %0 \n" // no effect in USR mode
  399. "ISB" : "=r"(cpsr), "=r"(result) : : "memory"
  400. );
  401. return result;
  402. }
  403. /** \brief Set USR/SYS Stack Pointer
  404. \param [in] topOfProcStack USR/SYS Stack Pointer value to set
  405. */
  406. __STATIC_FORCEINLINE void __set_SP_usr(uint32_t topOfProcStack)
  407. {
  408. uint32_t cpsr;
  409. __ASM volatile(
  410. "MRS %0, cpsr \n"
  411. "CPS #0x1F \n" // no effect in USR mode
  412. "MOV sp, %1 \n"
  413. "MSR cpsr_c, %0 \n" // no effect in USR mode
  414. "ISB" : "=r"(cpsr) : "r" (topOfProcStack) : "memory"
  415. );
  416. }
  417. /** \brief Get FPEXC
  418. \return Floating Point Exception Control register value
  419. */
  420. __STATIC_FORCEINLINE uint32_t __get_FPEXC(void)
  421. {
  422. #if (__FPU_PRESENT == 1)
  423. uint32_t result;
  424. __ASM volatile("VMRS %0, fpexc" : "=r" (result) : : "memory");
  425. return(result);
  426. #else
  427. return(0);
  428. #endif
  429. }
  430. /** \brief Set FPEXC
  431. \param [in] fpexc Floating Point Exception Control value to set
  432. */
  433. __STATIC_FORCEINLINE void __set_FPEXC(uint32_t fpexc)
  434. {
  435. #if (__FPU_PRESENT == 1)
  436. __ASM volatile ("VMSR fpexc, %0" : : "r" (fpexc) : "memory");
  437. #endif
  438. }
  439. /*
  440. * Include common core functions to access Coprocessor 15 registers
  441. */
  442. #define __get_CP(cp, op1, Rt, CRn, CRm, op2) __ASM volatile("MRC p" # cp ", " # op1 ", %0, c" # CRn ", c" # CRm ", " # op2 : "=r" (Rt) : : "memory" )
  443. #define __set_CP(cp, op1, Rt, CRn, CRm, op2) __ASM volatile("MCR p" # cp ", " # op1 ", %0, c" # CRn ", c" # CRm ", " # op2 : : "r" (Rt) : "memory" )
  444. #define __get_CP64(cp, op1, Rt, CRm) __ASM volatile("MRRC p" # cp ", " # op1 ", %Q0, %R0, c" # CRm : "=r" (Rt) : : "memory" )
  445. #define __set_CP64(cp, op1, Rt, CRm) __ASM volatile("MCRR p" # cp ", " # op1 ", %Q0, %R0, c" # CRm : : "r" (Rt) : "memory" )
  446. #include "cmsis_cp15.h"
  447. /** \brief Enable Floating Point Unit
  448. Critical section, called from undef handler, so systick is disabled
  449. */
  450. __STATIC_INLINE void __FPU_Enable(void)
  451. {
  452. __ASM volatile(
  453. //Permit access to VFP/NEON, registers by modifying CPACR
  454. " MRC p15,0,R1,c1,c0,2 \n"
  455. " ORR R1,R1,#0x00F00000 \n"
  456. " MCR p15,0,R1,c1,c0,2 \n"
  457. //Ensure that subsequent instructions occur in the context of VFP/NEON access permitted
  458. " ISB \n"
  459. //Enable VFP/NEON
  460. " VMRS R1,FPEXC \n"
  461. " ORR R1,R1,#0x40000000 \n"
  462. " VMSR FPEXC,R1 \n"
  463. //Initialise VFP/NEON registers to 0
  464. " MOV R2,#0 \n"
  465. //Initialise D16 registers to 0
  466. " VMOV D0, R2,R2 \n"
  467. " VMOV D1, R2,R2 \n"
  468. " VMOV D2, R2,R2 \n"
  469. " VMOV D3, R2,R2 \n"
  470. " VMOV D4, R2,R2 \n"
  471. " VMOV D5, R2,R2 \n"
  472. " VMOV D6, R2,R2 \n"
  473. " VMOV D7, R2,R2 \n"
  474. " VMOV D8, R2,R2 \n"
  475. " VMOV D9, R2,R2 \n"
  476. " VMOV D10,R2,R2 \n"
  477. " VMOV D11,R2,R2 \n"
  478. " VMOV D12,R2,R2 \n"
  479. " VMOV D13,R2,R2 \n"
  480. " VMOV D14,R2,R2 \n"
  481. " VMOV D15,R2,R2 \n"
  482. #if __ARM_NEON == 1
  483. //Initialise D32 registers to 0
  484. " VMOV D16,R2,R2 \n"
  485. " VMOV D17,R2,R2 \n"
  486. " VMOV D18,R2,R2 \n"
  487. " VMOV D19,R2,R2 \n"
  488. " VMOV D20,R2,R2 \n"
  489. " VMOV D21,R2,R2 \n"
  490. " VMOV D22,R2,R2 \n"
  491. " VMOV D23,R2,R2 \n"
  492. " VMOV D24,R2,R2 \n"
  493. " VMOV D25,R2,R2 \n"
  494. " VMOV D26,R2,R2 \n"
  495. " VMOV D27,R2,R2 \n"
  496. " VMOV D28,R2,R2 \n"
  497. " VMOV D29,R2,R2 \n"
  498. " VMOV D30,R2,R2 \n"
  499. " VMOV D31,R2,R2 \n"
  500. #endif
  501. //Initialise FPSCR to a known state
  502. " VMRS R1,FPSCR \n"
  503. " LDR R2,=0x00086060 \n" //Mask off all bits that do not have to be preserved. Non-preserved bits can/should be zero.
  504. " AND R1,R1,R2 \n"
  505. " VMSR FPSCR,R1 "
  506. : : : "cc", "r1", "r2"
  507. );
  508. }
  509. #endif /* __CMSIS_ARMCLANG_H */