]> gitweb.factorcode.org Git - factor.git/commitdiff
cpu.x86.features: temporary fix for bootstrap issue.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 19 Sep 2012 17:41:54 +0000 (10:41 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 19 Sep 2012 17:41:54 +0000 (10:41 -0700)
basis/cpu/x86/features/features.factor

index 89168e6a5a926554ed75edbfe3543acd2387adb1..0206d0431acbba43b20681e6e45f8187a9553fe4 100644 (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? ;