summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/sys_windows_386.s
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2013-03-04 21:27:36 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-03-04 21:27:36 +0100
commit04b08da9af0c450d645ab7389d1467308cfc2db8 (patch)
treedb247935fa4f2f94408edc3acd5d0d4f997aa0d8 /src/pkg/runtime/sys_windows_386.s
parent917c5fb8ec48e22459d77e3849e6d388f93d3260 (diff)
downloadgolang-upstream/1.1_hg20130304.tar.gz
Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304
Diffstat (limited to 'src/pkg/runtime/sys_windows_386.s')
-rw-r--r--src/pkg/runtime/sys_windows_386.s42
1 files changed, 30 insertions, 12 deletions
diff --git a/src/pkg/runtime/sys_windows_386.s b/src/pkg/runtime/sys_windows_386.s
index d5646bfea..ca59f0a1d 100644
--- a/src/pkg/runtime/sys_windows_386.s
+++ b/src/pkg/runtime/sys_windows_386.s
@@ -216,7 +216,7 @@ TEXT runtime·callbackasm+0(SB),7,$0
CLD
- CALL runtime·cgocallback(SB)
+ CALL runtime·cgocallback_gofunc(SB)
POPL AX
POPL CX
@@ -243,11 +243,6 @@ TEXT runtime·tstart(SB),7,$0
MOVL newm+4(SP), CX // m
MOVL m_g0(CX), DX // g
- // Set up SEH frame
- PUSHL $runtime·sigtramp(SB)
- PUSHL 0(FS)
- MOVL SP, 0(FS)
-
// Layout new m scheduler stack on os stack.
MOVL SP, AX
MOVL AX, g_stackbase(DX)
@@ -264,14 +259,8 @@ TEXT runtime·tstart(SB),7,$0
CLD
CALL runtime·stackcheck(SB) // clobbers AX,CX
-
CALL runtime·mstart(SB)
- // Pop SEH frame
- MOVL 0(FS), SP
- POPL 0(FS)
- POPL CX
-
RET
// uint32 tstart_stdcall(M *newm);
@@ -296,3 +285,32 @@ TEXT runtime·setldt(SB),7,$0
MOVL address+4(FP), CX
MOVL CX, 0x14(FS)
RET
+
+// void install_exception_handler()
+TEXT runtime·install_exception_handler(SB),7,$0
+ get_tls(CX)
+ MOVL m(CX), CX // m
+
+ // Set up SEH frame
+ MOVL m_seh(CX), DX
+ MOVL $runtime·sigtramp(SB), AX
+ MOVL AX, seh_handler(DX)
+ MOVL 0(FS), AX
+ MOVL AX, seh_prev(DX)
+
+ // Install it
+ MOVL DX, 0(FS)
+
+ RET
+
+// void remove_exception_handler()
+TEXT runtime·remove_exception_handler(SB),7,$0
+ get_tls(CX)
+ MOVL m(CX), CX // m
+
+ // Remove SEH frame
+ MOVL m_seh(CX), DX
+ MOVL seh_prev(DX), AX
+ MOVL AX, 0(FS)
+
+ RET