1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

The destination register of an exclusive store must be

different from both the value and address register.  Fix building with
recent binutils by marking the result as early clobber.
This commit is contained in:
Michael Hope 2012-06-22 20:22:43 +12:00 committed by James Cotton
parent d78e4f2ca5
commit 0efb24a54b

View File

@ -733,7 +733,7 @@ uint32_t __STREXB(uint8_t value, uint8_t *addr)
{ {
uint32_t result=0; 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); return(result);
} }
@ -750,7 +750,7 @@ uint32_t __STREXH(uint16_t value, uint16_t *addr)
{ {
uint32_t result=0; 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); return(result);
} }