bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -mfence-as-lock-add option in binutils 2.27


From: Ian Lance Taylor
Subject: Re: -mfence-as-lock-add option in binutils 2.27
Date: Tue, 03 Oct 2017 05:46:14 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Parul Chahar <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]