On 30.10.2011 02:49, Manu wrote:
What's the deal with core.cpuid?
I realise it is an x86 opcode, but is that something that you really
want totally bare in core like that?
I'm experimenting with other architectures, and some sort of
core.processorInfo would be really nice, surely an API for this stuff
should be more generalised...?
core.cpuid exists *because the runtime needs it*. It's deliberately
_very_ low level. For example, it is essential that it does NOT perform
any memory allocation. The information it provides is CPU-dependent.
Basically -- don't use core.cpuid unless you're programming in asm.
Indeed, there should be a higher level module (std.sysinfo ?) for more
general use.