]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/bootstrap/assembler/x86.32.windows.factor
factor: trim using lists
[factor.git] / basis / bootstrap / assembler / x86.32.windows.factor
index 30c02eccc9d3b11560708dea00c8a489d854da47..fab75394201521c7ae88f7856a4b6d1ba8fe4aa7 100644 (file)
@@ -1,8 +1,8 @@
 ! Copyright (C) 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: compiler.codegen.relocation compiler.constants
-cpu.x86.assembler cpu.x86.assembler.operands kernel layouts
-locals parser sequences ;
+USING: compiler.codegen.relocation compiler.constants cpu.x86.assembler
+cpu.x86.assembler.operands kernel kernel.private layouts parser
+sequences ;
 IN: bootstrap.x86
 
 : tib-segment ( -- ) FS ;
@@ -11,13 +11,15 @@ IN: bootstrap.x86
 << "vocab:bootstrap/assembler/x86.windows.factor" parse-file suffix! >> call
 
 : jit-install-seh ( -- )
+    ! VM pointer must be in vm-reg already
     ! Create a new exception record and store it in the TIB.
     ! Clobbers tib-temp.
     ! Align stack
     ESP 3 bootstrap-cells ADD
-    ! Exception handler address filled in by callback.cpp
-    tib-temp 0 MOV rc-absolute-cell rel-exception-handler
+    tib-temp EBX WIN-EXCEPTION-HANDLER vm-special-object-offset [+] MOV
+    tib-temp tib-temp alien-offset [+] MOV
     tib-temp PUSH
+
     ! No next handler
     0 PUSH
     ! This is the new exception handler