Closed dd86k closed 5 years ago
Getting some good progress so far, this works nicely:
version (GNU) asm { // at&t
"mov %4, %%eax\n"~
"mov $0, %%ecx\n"~
"cpuid\n"~
"mov %%eax, %0\n"~
"mov %%ebx, %1\n"~
"mov %%ecx, %2\n"~
"mov %%edx, %3"
: "=a" a, "=b" b, "=c" c, "=d" d
: "r" leaf;
} else asm {
mov EAX, leaf;
mov ECX, 0;
cpuid;
mov a, EAX;
mov b, EBX;
mov c, ECX;
mov d, EDX;
}
I'm rather new to GAS, so don't mind my poor writing
Added with note in README
It's possible to support GDC, with its GAS syntax, with
version (GNU)
.I just need to learn GAS syntax and I should be fine.