Parul Chahar <parulcha...@gmail.com> writes: > I found that a new option "-mfence-as-lock-add" is added in binutils 2.27. > It generate lock instruction when "-mfence-as-lock-add=yes". Otherwise, > mfence, lfence, sfence is generated. > > Please let me know why this option is required. Why lock instruction is > needed.
It's not needed, but it can be more efficient. See, for example, https://shipilev.net/blog/2014/on-the-fence-with-dependencies/#_hardware Ian _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils