cpu.x86: enable bit-count intrinsic if POPCNT available

db4
Joe Groff 2010-05-15 14:00:12 -07:00
parent 5d35917061
commit 009408dd11
1 changed files with 3 additions and 2 deletions

View File

@ -1534,9 +1534,10 @@ enable-float-min/max
enable-fsqrt enable-fsqrt
: check-sse ( -- ) : check-sse ( -- )
[ { (sse-version) } compile ] with-optimizer [ { (sse-version) (popcnt?) } compile ] with-optimizer
sse-version 20 < [ sse-version 20 < [
"Factor requires SSE2, which your CPU does not support." print "Factor requires SSE2, which your CPU does not support." print
flush flush
1 exit 1 exit
] when ; ] when
popcnt? [ enable-bit-count ] when ;