cpu.x86.32: check for SSE2 on bootstrap since Factor now requires it
parent
eb89311bcd
commit
4a98278720
|
@ -237,5 +237,3 @@ USE: vocabs.loader
|
||||||
{ [ os unix? ] [ "cpu.x86.64.unix" require ] }
|
{ [ os unix? ] [ "cpu.x86.64.unix" require ] }
|
||||||
{ [ os winnt? ] [ "cpu.x86.64.winnt" require ] }
|
{ [ os winnt? ] [ "cpu.x86.64.winnt" require ] }
|
||||||
} cond
|
} cond
|
||||||
|
|
||||||
check-sse
|
|
||||||
|
|
|
@ -1502,26 +1502,15 @@ M: x86 immediate-bitwise? ( n -- ? )
|
||||||
enable-min/max
|
enable-min/max
|
||||||
enable-log2
|
enable-log2
|
||||||
|
|
||||||
:: install-sse2-check ( -- )
|
enable-float-intrinsics
|
||||||
[
|
enable-float-functions
|
||||||
sse-version 20 < [
|
enable-float-min/max
|
||||||
"This image was built to use SSE2 but your CPU does not support it." print
|
enable-fsqrt
|
||||||
"You will need to bootstrap Factor again." print
|
|
||||||
flush
|
|
||||||
1 exit
|
|
||||||
] when
|
|
||||||
] "cpu.x86" add-startup-hook ;
|
|
||||||
|
|
||||||
: enable-sse2 ( version -- )
|
|
||||||
20 >= [
|
|
||||||
enable-float-intrinsics
|
|
||||||
enable-float-functions
|
|
||||||
enable-float-min/max
|
|
||||||
enable-fsqrt
|
|
||||||
install-sse2-check
|
|
||||||
] when ;
|
|
||||||
|
|
||||||
: check-sse ( -- )
|
: check-sse ( -- )
|
||||||
[ { (sse-version) } compile ] with-optimizer
|
[ { (sse-version) } compile ] with-optimizer
|
||||||
"Checking for multimedia extensions: " write sse-version
|
sse-version 20 < [
|
||||||
[ sse-string write " detected" print ] [ enable-sse2 ] bi ;
|
"Factor requires SSE2, which your CPU does not support." print
|
||||||
|
flush
|
||||||
|
1 exit
|
||||||
|
] when ;
|
||||||
|
|
Loading…
Reference in New Issue