! 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 ;
<< "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