Inline assembly and CTFE
Joseph Cassman
jc7919 at outlook.com
Thu Oct 3 17:58:13 PDT 2013
On Thursday, 3 October 2013 at 22:30:24 UTC, David Nadlinger
wrote:
>
> What would you even want the function to return in the first
> place? The CPU features you can use obviously depend on the
> specific CPU the executable will run on, so the answer can't
> generally by known at compile time.
>
> Do you want to base your decision on the CPU of the build host?
> Or are you looking for an efficient way to implement the
> runtime check?
>
> David
Good questions. Yeah, the answer can't be generally known at
compile time. But can be interesting in the specific case (i.e.
when I can control both the build machine and the one it will
eventually run on). The function in the example is a flag similar
to core.cpuid.avx (http://dlang.org/phobos/core_cpuid.html#.avx).
Was mainly looking for some feedback on the plans for the scope
of CTFE in regards to assembly language.
Thanks for the input.
Joseph
More information about the Digitalmars-d
mailing list