[Bug target/80080] S390: Isses with emitted cs-instructions for __atomic builtins.

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Mar 21 16:57:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80080

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think it depends on what
(success, old_reg) = compare-and-swap(mem, old_reg, new_reg)
sets if success is true.  Is there a guarantee that old_reg will be assigned
whatever has been passed as the second argument in that case on all targets?
If yes, then it can work.  If not, then it will return a different value.
So I think you need to analyze all targets that have HW compare-and-swap and
verify that.


More information about the Gcc-bugs mailing list