assembler fix
parent
408939d92d
commit
9cb119f40c
|
@ -1,6 +1,13 @@
|
|||
! Copyright (C) 2005 Slava Pestov.
|
||||
! See http://factor.sf.net/license.txt for BSD license.
|
||||
IN: compiler-backend
|
||||
USING: arrays hashtables kernel lists math namespaces sequences ;
|
||||
|
||||
! Optimizations performed here:
|
||||
! - combining %inc-d/%inc-r within a single basic block
|
||||
! - removing dead loads of stack locations into vregs
|
||||
! - removing dead stores of vregs into stack locations
|
||||
|
||||
: vop-in ( vop n -- input ) swap vop-inputs nth ;
|
||||
: set-vop-in ( input vop n -- ) swap vop-inputs set-nth ;
|
||||
: vop-out ( vop n -- input ) swap vop-outputs nth ;
|
||||
|
|
|
@ -18,9 +18,6 @@ lists math memory namespaces parser sequences words ;
|
|||
: label? ( obj -- ? )
|
||||
dup word? [ "label" word-prop ] [ drop f ] if ;
|
||||
|
||||
! A location is a virtual register or a stack slot. We can
|
||||
! ask a VOP if it reads or writes a location.
|
||||
|
||||
! A virtual register
|
||||
TUPLE: vreg n ;
|
||||
|
||||
|
|
|
@ -262,5 +262,5 @@ M: operand CMP OCT: 071 2-operand ;
|
|||
( x87 Floating Point Unit )
|
||||
|
||||
: (FSTP) BIN: 100 f HEX: 1c 1-operand ;
|
||||
: FSTPS ( operand -- ) HEX: d9 (FSTP) ;
|
||||
: FSTPL ( operand -- ) HEX: dd (FSTP) ;
|
||||
: FSTPS ( operand -- ) HEX: d9 assemble-1 (FSTP) ;
|
||||
: FSTPL ( operand -- ) HEX: dd assemble-1 (FSTP) ;
|
||||
|
|
Loading…
Reference in New Issue