Преглед изворни кода

Merge pull request #95 from Kochise/patch-1

Added __CMSIS_GCC_OUT_RW_REG
Martin Günther пре 9 година
родитељ
комит
0e433b9847
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      CMSIS/Core/Include/cmsis_gcc.h

+ 2 - 0
CMSIS/Core/Include/cmsis_gcc.h

@@ -674,9 +674,11 @@ __attribute__((always_inline)) __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
  * Otherwise, use general registers, specified by constraint "r" */
 #if defined (__thumb__) && !defined (__thumb2__)
 #define __CMSIS_GCC_OUT_REG(r) "=l" (r)
+#define __CMSIS_GCC_RW_REG(r) "+l" (r)
 #define __CMSIS_GCC_USE_REG(r) "l" (r)
 #else
 #define __CMSIS_GCC_OUT_REG(r) "=r" (r)
+#define __CMSIS_GCC_RW_REG(r) "+r" (r)
 #define __CMSIS_GCC_USE_REG(r) "r" (r)
 #endif