diff --git a/library/compiler/x86/alien.factor b/library/compiler/x86/alien.factor index d97ca67f4a..183106dba0 100644 --- a/library/compiler/x86/alien.factor +++ b/library/compiler/x86/alien.factor @@ -31,10 +31,6 @@ M: %unbox generate-node drop 2 input f compile-c-call 1 input push-return-reg ; : struct-ptr/size ( func -- ) - ! Increase stack size - ESP 2 input SUB - ! Save destination address in EAX - EAX ESP MOV ! Load struct size 2 input PUSH ! Load destination address @@ -46,9 +42,17 @@ M: %unbox generate-node ECX POP ; M: %unbox-struct generate-node ( vop -- ) - drop "unbox_value_struct" struct-ptr/size ; + drop + ! Increase stack size + ESP 2 input SUB + ! Save destination address in EAX + EAX ESP MOV + "unbox_value_struct" struct-ptr/size ; M: %box-struct generate-node ( vop -- ) + ! Compute source address in EAX + EAX ESP MOV + EAX 4 ADD drop "box_value_struct" struct-ptr/size ; M: %box generate-node diff --git a/library/compiler/x86/slots.factor b/library/compiler/x86/slots.factor index 7f468f7c9c..a2fae93bcd 100644 --- a/library/compiler/x86/slots.factor +++ b/library/compiler/x86/slots.factor @@ -22,14 +22,8 @@ M: %write-barrier generate-node ( vop -- ) #! Mark the card pointed to by vreg. drop 0 input-operand card-bits SHR - 0 scratch card-offset MOV rel-absolute-cell rel-cards - 0 scratch 0 input-operand ADD - 0 scratch [] card-mark OR ; - -! drop -! 0 input-operand card-bits SHR -! 0 input-operand card-offset [+] card-mark OR -! rel-absolute-cell rel-cards ; + 0 input-operand card-offset ADD rel-absolute-cell rel-cards + 0 input-operand [] card-mark OR ; M: %set-slot generate-node ( vop -- ) drop