Fix x86.32
parent
0ae87275f7
commit
804c6f93ea
|
@ -1,4 +1,4 @@
|
|||
! Copyright (C) 2004, 2008 Slava Pestov.
|
||||
! Copyright (C) 2004, 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors arrays assocs combinators hashtables kernel
|
||||
math fry namespaces make sequences words byte-arrays
|
||||
|
|
|
@ -12,12 +12,12 @@ IN: compiler.cfg.intrinsics.slots
|
|||
: value-tag ( info -- n ) class>> class-tag ; inline
|
||||
|
||||
: (emit-slot) ( infos -- dst )
|
||||
[ 2inputs ] [ first value-tag ] bi*
|
||||
[ 2inputs ^^offset>slot ] [ first value-tag ] bi*
|
||||
^^slot ;
|
||||
|
||||
: (emit-slot-imm) ( infos -- dst )
|
||||
ds-drop
|
||||
[ ds-pop ^^offset>slot ]
|
||||
[ ds-pop ]
|
||||
[ [ second literal>> ] [ first value-tag ] bi ] bi*
|
||||
^^slot-imm ;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ M: float-regs store-return-reg
|
|||
[ [ align-sub ] [ call ] bi* ]
|
||||
[ [ align-add ] [ drop ] bi* ] 2bi ; inline
|
||||
|
||||
M: x86.64 rel-literal-x86 rc-absolute-cell rel-literal ;
|
||||
M: x86.32 rel-literal-x86 rc-absolute-cell rel-literal ;
|
||||
|
||||
M: x86.32 %prologue ( n -- )
|
||||
dup PUSH
|
||||
|
@ -281,10 +281,12 @@ os windows? [
|
|||
FUNCTION: bool check_sse2 ( ) ;
|
||||
|
||||
: sse2? ( -- ? )
|
||||
[ optimized-recompile-hook ] recompile-hook
|
||||
[ [ check_sse2 ] compile-call ] with-variable ;
|
||||
check_sse2 ;
|
||||
|
||||
"-no-sse2" cli-args member? [
|
||||
[ optimized-recompile-hook ] recompile-hook
|
||||
[ { check_sse2 } compile ] with-variable
|
||||
|
||||
"Checking if your CPU supports SSE2..." print flush
|
||||
sse2? [
|
||||
" - yes" print
|
||||
|
|
|
@ -40,9 +40,9 @@ DEF(void,set_callstack,(F_STACK_FRAME *to, F_STACK_FRAME *from, CELL length, voi
|
|||
ret /* return _with new stack_ */
|
||||
|
||||
/* cpu.x86.32 calls this */
|
||||
DEF(bool,check_sse2,())
|
||||
DEF(bool,check_sse2,()):
|
||||
push %ebx
|
||||
mov 1,%eax
|
||||
mov $1,%eax
|
||||
cpuid
|
||||
shr $26,%edx
|
||||
and $1,%edx
|
||||
|
|
Loading…
Reference in New Issue