aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/gendef
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2008-03-01 13:18:22 +0000
committerChristopher Faylor <me@cgf.cx>2008-03-01 13:18:22 +0000
commit813767de3db47bae178d815e32770787bbb2cfed (patch)
tree5fcc4009db05acb7e2cdc40140117e4ae2b43962 /winsup/cygwin/gendef
parent76ff710cfaa54aa7a85b15d2d2b0303a53afe83d (diff)
downloadnewlib-813767de3db47bae178d815e32770787bbb2cfed.zip
newlib-813767de3db47bae178d815e32770787bbb2cfed.tar.gz
newlib-813767de3db47bae178d815e32770787bbb2cfed.tar.bz2
* exceptions.cc (_cygtls::handle_exceptions): Only call rtl_unwind when
exiting. Just return, don't set thread context. * gendef (_setjmp): Store %fs:0 in jmp_buf. (_sjfault): Ditto. (_ljfault): Restore %fs:0 from jmp_buf. (_longjmp): Ditto.
Diffstat (limited to 'winsup/cygwin/gendef')
-rwxr-xr-xwinsup/cygwin/gendef12
1 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef
index 0d7df4b..28d4b31 100755
--- a/winsup/cygwin/gendef
+++ b/winsup/cygwin/gendef
@@ -332,12 +332,14 @@ _setjmp:
movw %ax,40(%edi)
movw %ss,%ax
movw %ax,42(%edi)
+ movl %fs:0,%eax
+ movl %eax,44(%edi)
pushl %ebx
call stabilize_sig_stack
movl $tls::stackptr(%ebx),%eax # save stack pointer contents
decl $tls::stacklock(%ebx)
popl %ebx
- movl %eax,44(%edi)
+ movl %eax,48(%edi)
popl %edi
movl \$0,%eax
leave
@@ -371,6 +373,8 @@ ___sjfault:
movw %ax,40(%edi)
movw %ss,%ax
movw %ax,42(%edi)
+ movl %fs:0,%eax
+ movl %eax,44(%edi)
popl %edi
movl \$0,%eax
leave
@@ -391,6 +395,8 @@ ___ljfault:
movl 24(%edi),%ebp
pushfl
popl %ebx
+ movl 44(%edi),%eax
+ movl %eax,%fs:0
movw 42(%edi),%ax
movw %ax,%ss
movl 28(%edi),%esp
@@ -415,7 +421,7 @@ _longjmp:
movl %esp,%ebp
movl 8(%ebp),%edi # address of buffer
call stabilize_sig_stack
- movl 44(%edi),%eax # get old signal stack
+ movl 48(%edi),%eax # get old signal stack
movl %eax,$tls::stackptr(%ebx) # restore
decl $tls::stacklock(%ebx) # relinquish lock
xorl %eax,%eax
@@ -430,6 +436,8 @@ _longjmp:
movl 24(%edi),%ebp
pushfl
popl %ebx
+ movl 44(%edi),%eax
+ movl %eax,%fs:0
movw 42(%edi),%ax
movw %ax,%ss
movl 28(%edi),%esp