]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/cpu/x86/64/winnt/bootstrap.factor
Store stack bounds in TIB on win64 to make C++ exceptions work
[factor.git] / basis / cpu / x86 / 64 / winnt / bootstrap.factor
index 113a13918f1f84bd04c4cfda4e6372624acf8768..f816980e57121fa207fd91a92bb9a6b2f78a10b9 100644 (file)
@@ -5,6 +5,8 @@ vocabs sequences cpu.x86.assembler parser
 cpu.x86.assembler.operands ;
 IN: bootstrap.x86
 
+DEFER: stack-reg
+
 : stack-frame-size ( -- n ) 8 bootstrap-cells ;
 : nv-regs ( -- seq ) { RBX RSI RDI R12 R13 R14 R15 } ;
 : arg1 ( -- reg ) RCX ;
@@ -12,5 +14,12 @@ IN: bootstrap.x86
 : arg3 ( -- reg ) R8 ;
 : arg4 ( -- reg ) R9 ;
 
-<< "vocab:cpu/x86/64/bootstrap.factor" parse-file suffix! >>
-call
+: tib-segment ( -- ) GS ;
+: tib-temp ( -- reg ) R11 ;
+
+: jit-install-seh ( -- ) stack-reg bootstrap-cell ADD ;
+: jit-update-seh ( ctx-reg -- ) drop ;
+
+<< "vocab:cpu/x86/winnt/bootstrap.factor" parse-file suffix! >> call
+<< "vocab:cpu/x86/64/bootstrap.factor" parse-file suffix! >> call
+<< "vocab:cpu/x86/bootstrap.factor" parse-file suffix! >> call