From 1ab4622435eb076fba5aa7e168e3604aa9a46bbe Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Mon, 29 Feb 2016 00:49:11 +0100 Subject: [PATCH] fix based on https://gist.github.com/timbrom/1942280 --- Libraries/CMSIS/CM3/CoreSupport/core_cm3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c b/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c index 56fddc5..0e8c3c4 100644 --- a/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c +++ b/Libraries/CMSIS/CM3/CoreSupport/core_cm3.c @@ -733,7 +733,7 @@ uint32_t __STREXB(uint8_t value, uint8_t *addr) { uint32_t result=0; - __ASM volatile ("strexb %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) ); + __ASM volatile ("strexb %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value) ); return(result); } @@ -750,7 +750,7 @@ uint32_t __STREXH(uint16_t value, uint16_t *addr) { uint32_t result=0; - __ASM volatile ("strexh %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) ); + __ASM volatile ("strexh %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value) ); return(result); } -- 2.20.1