cpu.x86.features: temporary fix for bootstrap issue.

db4
John Benediktsson 2012-09-19 10:41:54 -07:00
parent 6cba7af1e1
commit e45f0ec9e2
1 changed files with 9 additions and 1 deletions

View File

@ -104,7 +104,15 @@ HOOK: (cpuid) cpu ( n regs -- )
cpu-extended-model cpu-model [ >hex ] bi@
] "" append-outputs-as ;
: popcnt? ( -- ? ) 1 cpuid third 23 bit? ;
: popcnt? ( -- ? )
bool { } cdecl [
return-reg 1 MOV
CPUID
return-reg dup XOR
ECX 23 BT
return-reg SETB
] alien-assembly ;
: tscdeadline? ( -- ? ) 1 cpuid third 24 bit? ;
: aes? ( -- ? ) 1 cpuid third 25 bit? ;
: xsave? ( -- ? ) 1 cpuid third 26 bit? ;