Bug 15933 – GDC support for core.cpuid

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2016-04-16T23:10:00Z
Last change time
2017-07-18T21:34:34Z
Assigned to
nobody
Creator
Marco.Leise

Comments

Comment #0 by Marco.Leise — 2016-04-16T23:10:27Z
GDC does not implement DMD style inline assembly, but offers another inline assembly mechanism called extended assembler where the asm block is a template filled out by the compiler and passed to an external assembler executable that understands either AT&T or Intel style on x86. In the simplest form core.cpuid needs a few versioned asm blocks for GDC that duplicate what the DMD asm blocks do. Another idea is to replace the accessor properties with direct access to the global constants (mmx, hasPopcnt, etc.) to work around GDC's inability to inline across modules.
Comment #1 by Marco.Leise — 2017-07-18T21:34:34Z
This was fixed in 2.072 with commit https://github.com/dlang/druntime/commit/c230cd4d52de1b05d15f61f6fb6d0e74b084f5c9pidgi as far as I understand the tag range given by GitHub.