diff options
author | Christopher Faylor <me@cgf.cx> | 2005-08-28 23:26:23 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-08-28 23:26:23 +0000 |
commit | c461fbf160b97eeb0903c16c5212ac80e4bbeabe (patch) | |
tree | 981d61d6a3342f32887c5960051ed28df492e3ba /winsup/cygwin/gendef | |
parent | 2241d3fb53d05760d50bd195b07681756cfbdb25 (diff) | |
download | cygnal-c461fbf160b97eeb0903c16c5212ac80e4bbeabe.tar.gz cygnal-c461fbf160b97eeb0903c16c5212ac80e4bbeabe.tar.bz2 cygnal-c461fbf160b97eeb0903c16c5212ac80e4bbeabe.zip |
* cygtls.h (__ljfault): Declare.
(_cygtls::return_from_fault): Use __ljfault.
* exceptions.cc (set_signal_mask): Revert previous checkin.
* gendef (__sjfault): Split out into a separate function which doesn't bother
with any special signal locking. routines.
(_ljfault): Return from a __sjfault without bothering with signals.
Diffstat (limited to 'winsup/cygwin/gendef')
-rwxr-xr-x | winsup/cygwin/gendef | 69 |
1 files changed, 67 insertions, 2 deletions
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef index 9d8a211e6..e743ebcfc 100755 --- a/winsup/cygwin/gendef +++ b/winsup/cygwin/gendef @@ -272,9 +272,8 @@ EOF sub longjmp { return <<EOF; - .globl _setjmp, ___sjfault + .globl _setjmp _setjmp: -___sjfault: pushl %ebp movl %esp,%ebp pushl %edi @@ -312,6 +311,72 @@ ___sjfault: leave ret + .globl ___sjfault +___sjfault: + pushl %ebp + movl %esp,%ebp + pushl %edi + movl 8(%ebp),%edi + movl %eax,0(%edi) + movl %ebx,4(%edi) + movl %ecx,8(%edi) + movl %edx,12(%edi) + movl %esi,16(%edi) + movl -4(%ebp),%eax + movl %eax,20(%edi) + movl 0(%ebp),%eax + movl %eax,24(%edi) + movl %esp,%eax + addl \$12,%eax + movl %eax,28(%edi) + movl 4(%ebp),%eax + movl %eax,32(%edi) + movw %es,%ax + movw %ax,36(%edi) + movw %fs,%ax + movw %ax,38(%edi) + movw %gs,%ax + movw %ax,40(%edi) + movw %ss,%ax + movw %ax,42(%edi) + popl %edi + movl \$0,%eax + leave + ret + + .global ___ljfault +___ljfault: + pushl %ebp + movl %esp,%ebp + movl 8(%ebp),%edi + + movl 12(%ebp),%eax + testl %eax,%eax + jne 0f + incl %eax + +0: movl %eax,0(%edi) + movl 24(%edi),%ebp + pushfl + popl %ebx + movw 42(%edi),%ax + movw %ax,%ss + movl 28(%edi),%esp + pushl 32(%edi) + pushl %ebx + movw 36(%edi),%ax + movw %ax,%es + movw 40(%edi),%ax + movw %ax,%gs + movl 0(%edi),%eax + movl 4(%edi),%ebx + movl 8(%edi),%ecx + movl 16(%edi),%esi + movl 12(%edi),%edx + movl 20(%edi),%edi + popfl + ret + .globl _longjmp _longjmp: pushl %ebp |