I use IAR workbench IDE ver 9.60.1
uint32_t __STREXH(uint16_t value, uint16_t *addr){ __ASM("strexh r0, r0, [r1]"); __ASM("bx lr");}uint32_t __STREXB(uint8_t value, uint8_t *addr){ __ASM("strexb r0, r0, [r1]"); __ASM("bx lr");}uint32_t __STREXW(uint32_t value, uint32_t *addr){ __ASM("strex r0, r0, [r1]"); __ASM("bx lr");}
ERROR in inline assembly : "Unpredictable register combination" . can you help me fix some error
For strexh, strexb, and strex, the value and address should be moved to the correct registers. For example, r0 is typically used to hold the value being stored, and r1 holds the address.
strexh
strexb
strex
r0
r1
Thank you