[Issue 20838] on modern (x86_64) CPUs, dmd emit cmpxchg8b instead of CMPXCHG16B
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 18 22:26:23 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20838
--- Comment #13 from mw <mingwu at gmail.com> ---
> you need to manually take care of required 16-bytes alignment:
> align(16) shared(N) n; // or `align(2 * size_t.sizeof)`
Thank you again!
(I'm a newbie to D, not sure where is the best place to continue discuss this?
pls let me know.)
BUT: can the DMD compiler (after seeing the 'cas' call) take care of this
alignment? either silently, or issue an warning message to the programmer?
Can I log another bug for this suggestion of DMD compiler improvement?
The current behavior that I just discovered is definitely a puzzle for a D
newbie like me. With a smarter compiler, it will help new users.
--
More information about the Digitalmars-d-bugs
mailing list