Skip to content

Commit

Permalink
Merge pull request #2 from M3gaFr3ak/patch-1
Browse files Browse the repository at this point in the history
Fixes "Registers may not be the same" error
  • Loading branch information
jeremyherbert committed Oct 18, 2015
2 parents 8bb8c9d + c3b9b2e commit e18a0df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stm32vl-discovery/lib/src/core/core_cm3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit e18a0df

Please sign in to comment.