From d52c0b1987df41d40eb2aa0363e2bea0afa9774c Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 19 Sep 2012 08:48:14 -0700 Subject: [PATCH] cpu.x86.features: Unbiased CPUID test. --- basis/cpu/x86/features/features-tests.factor | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/basis/cpu/x86/features/features-tests.factor b/basis/cpu/x86/features/features-tests.factor index 8cc20b32b7..63582ec1bf 100644 --- a/basis/cpu/x86/features/features-tests.factor +++ b/basis/cpu/x86/features/features-tests.factor @@ -5,5 +5,8 @@ IN: cpu.x86.features.tests [ t ] [ sse-version 0 42 between? ] unit-test [ t ] [ [ 10000 [ ] times ] count-instructions integer? ] unit-test -{ "GenuineIntel" } -[ 0 cpuid [ 4 >le ] map { 1 3 2 } swap nths concat >string ] unit-test +{ t } +[ + 0 cpuid [ 4 >le ] map { 1 3 2 } swap nths concat >string + { "GenuineIntel" "AuthenticAMD" } member? +] unit-test