[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 02:15:27 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20838

--- Comment #5 from mw <mingwu at gmail.com> ---
LDC ? did I miss sth?

--------------------------------------------------------------------------------
$ ldc2 -m64 -c c.d
$ obj2asm c.o > c.o.asm
$ grep -i xchg  c.o.asm
                cmpxchg8b       [RSI]
                cmpxchg8b       [RSI]
                cmpxchg8b       [RSI]
                cmpxchg8b       [RSI]
                cmpxchg8b       [RSI]
.data._D100TypeInfo_S3ldc10intrinsics__T13CmpXchgResultTS4core8internal6atomic__T11_AtomicTypeTS1c1NZ5UCentZQCq6__initZ
segment
_D100TypeInfo_S3ldc10intrinsics__T13CmpXchgResultTS4core8internal6atomic__T11_AtomicTypeTS1c1NZ5UCentZQCq6__initZ:
.data._D100TypeInfo_S3ldc10intrinsics__T13CmpXchgResultTS4core8internal6atomic__T11_AtomicTypeTS1c1NZ5UCentZQCq6__initZ
ends


$ ldc2 --version
LDC - the LLVM D compiler (1.21.0):
  based on DMD v2.091.1 and LLVM 10.0.0
  built with LDC - the LLVM D compiler (1.21.0)
  Default target: x86_64-unknown-linux-gnu
  Host CPU: skylake
  http://dlang.org - http://wiki.dlang.org/LDC
--------------------------------------------------------------------------------

Want to file a bug against LDC ?

--


More information about the Digitalmars-d-bugs mailing list