Yep, I commented the base version (uint32_t result=0;).
Because it was offending the GNU assembler with:

- strexh r0, r0, [r1]
- strexb r0, r0, [r1]

Then I replaced it by:
- register uint32_t result asm ("r2"); 

According to ARM documentation, for STREX, Rd must be different from both Rt
and Rn.

now the compiler output is:

- strexh r2, r0, [r1]
- strexb r2, r0, [r1]

With the above assembler code, the GNU assembler (GAS) doesn't complain
anymore.
I believe this is a great workaround for that problem.
-- 
View this message in context: 
http://old.nabble.com/-Bug-gas-13215--New%3A-ARM-Cortex-M3-strexh-strexb-instructions-with-same-registers-generates-error-tp32516436p33051551.html
Sent from the Gnu - Binutils - Bugs mailing list archive at Nabble.com.


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to