Bug 12121 – atomicLoad!(MemoryOrder.acq) should not emit additional code on X86
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-09T10:49:00Z
Last change time
2014-02-15T15:48:34Z
Assigned to
nobody
Creator
stanislav.blinov
Comments
Comment #0 by stanislav.blinov — 2014-02-09T10:49:48Z
Current implementation of needsLoadBarrier in core.atomic is as follows:
template needsLoadBarrier( MemoryOrder ms )
{
enum bool needsLoadBarrier = ms != MemoryOrder.raw;
}
On X86, acquire loads should not require fences, release-acquire ordering is automatic.