Skip to content

Commit

Permalink
STLEX out register must be different from input regs
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinKastberg committed Dec 4, 2023
1 parent 9e3cc85 commit 65403bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMSIS/Core/Include/m-profile/cmsis_iccarm_m.h
Original file line number Diff line number Diff line change
Expand Up @@ -986,21 +986,21 @@ __STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control)
__IAR_FT uint32_t __STLEXB(uint8_t value, volatile uint8_t *ptr)
{
uint32_t res;
__ASM volatile ("STLEXB %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory");
__ASM volatile ("STLEXB %0, %2, [%1]" : "=&r" (res) : "r" (ptr), "r" (value) : "memory");
return res;
}

__IAR_FT uint32_t __STLEXH(uint16_t value, volatile uint16_t *ptr)
{
uint32_t res;
__ASM volatile ("STLEXH %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory");
__ASM volatile ("STLEXH %0, %2, [%1]" : "=&r" (res) : "r" (ptr), "r" (value) : "memory");
return res;
}

__IAR_FT uint32_t __STLEX(uint32_t value, volatile uint32_t *ptr)
{
uint32_t res;
__ASM volatile ("STLEX %0, %2, [%1]" : "=r" (res) : "r" (ptr), "r" (value) : "memory");
__ASM volatile ("STLEX %0, %2, [%1]" : "=&r" (res) : "r" (ptr), "r" (value) : "memory");
return res;
}

Expand Down

0 comments on commit 65403bf

Please sign in to comment.