[Issue 18865] Add x86 SIMD Intrinsics to druntime
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 28 05:16:55 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=18865
Richard Cattermole <alphaglosined at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alphaglosined at gmail.com
--- Comment #5 from Richard Cattermole <alphaglosined at gmail.com> ---
(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.
--
More information about the Digitalmars-d-bugs
mailing list