www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19575] New: core.cpuid not usable without a runtime

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

          Issue ID: 19575
           Summary: core.cpuid not usable without a runtime
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: aliloko gmail.com

core.cpuid relias on 

     static shared this()

for initialization.

Without a D runtime, such initializers are never called. So we had to duplicate
core.cpuid.


It goes further, as rounding mode in Phobos uses the runtime variable `sse`
from `core.cpuid`. Again, this makes FloatingPointControl not usable

Why do I need `FloatingPointControl` in -betterC?

I'm implementing intel-intrinsics for both DMD and LDC, and the slow compatible
path has to have the same rounding-mode.

But `intel-intrinsics` package is intended to work in any situation, with or
without runtime.


***The only thing needed is a way to initialized core.cpuid with a function
call.***

--
Jan 11 2019