summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index c4b076169..e6c000f3e 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1929,9 +1929,14 @@ swapcontext (ucontext_t *oucp, const ucontext_t *ucp)
is NULL, call exit. */
__asm__ (" \n\
.global __cont_link_context \n\
+ .seh_proc __cont_link_context \n\
__cont_link_context: \n\
+ .seh_endprologue \n\
movq %rbx, %rsp \n\
- popq %rcx \n\
+ movq (%rsp), %rcx \n\
+ # align stack and subtract shadow space \n\
+ andq $~0xf, %rsp \n\
+ subq $0x20, %rsp \n\
testq %rcx, %rcx \n\
je 1f \n\
call setcontext \n\
@@ -1939,6 +1944,7 @@ __cont_link_context: \n\
1: \n\
call cygwin_exit \n\
nop \n\
+ .seh_endproc \n\
");
#else