[Bug target/48126] arm_output_sync_loop: misplaced memory barrier, missing clrex / dummy strex
marcus.shawcroft at arm dot com
gcc-bugzilla@gcc.gnu.org
Tue May 24 14:46:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48126
--- Comment #3 from Marcus Shawcroft <marcus.shawcroft at arm dot com> 2011-05-24 13:37:03 UTC ---
The primitive is required to have lock semantics therefore the load of the old
value must be followed by a dmb in the case that the old value comparison
succeeds and the swap goes ahead. In the branch out case the final dmb serves
no purpose, the swap did not occur and no lock was taken. Therefore the branch
over dmb is ok.
More information about the Gcc-bugs
mailing list