https://issues.dlang.org/show_bug.cgi?id=18865
Richard Cattermole <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #5 from Richard Cattermole <[email protected]> --- (In reply to Jack Stouffer from comment #4) > BTW core.atomic is a good example of what we already have in druntime. It > already special cases atomic operators between inline ASM for DMD and LLVM > intrinsic calls for LDC (at least LDC's overloaded version does anyway). So > I don't see why we couldn't do the same thing for Intel intrinsics. core.atomic is a great example of when intrinsics need to be compiler backed and not emulated by inline assembly. core.atomic can be 3-4 call stacks deep before the inline assembly actually gets executed. This gives plenty of time for whatever was returned to no longer be true. This is a major problem for lock-free concurrent programming. It is how you get segfaults, please don't ask me how I know. --
