diff options
author | Christopher Faylor <me@cgf.cx> | 2000-02-17 19:38:33 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-02-17 19:38:33 +0000 |
commit | 1fd5e000ace55b323124c7e556a7a864b972a5c4 (patch) | |
tree | dc4fcf1e5e22a040716ef92c496b8d94959b2baa /winsup/cygwin/config/i386/longjmp.c | |
parent | 369d8a8fd5e887eca547bf34bccfdf755c9e5397 (diff) | |
download | cygnal-1fd5e000ace55b323124c7e556a7a864b972a5c4.tar.gz cygnal-1fd5e000ace55b323124c7e556a7a864b972a5c4.tar.bz2 cygnal-1fd5e000ace55b323124c7e556a7a864b972a5c4.zip |
import winsup-2000-02-17 snapshot
Diffstat (limited to 'winsup/cygwin/config/i386/longjmp.c')
-rw-r--r-- | winsup/cygwin/config/i386/longjmp.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/winsup/cygwin/config/i386/longjmp.c b/winsup/cygwin/config/i386/longjmp.c new file mode 100644 index 000000000..d663e20f7 --- /dev/null +++ b/winsup/cygwin/config/i386/longjmp.c @@ -0,0 +1,51 @@ +/* longjmp.c + + Copyright 1996, 1998 Cygnus Solutions. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +#ifdef __i386__ +#if 1 +asm (" .globl _longjmp \n" +"_longjmp: \n" +" pushl %ebp \n" +" movl %esp,%ebp \n" +" movl 8(%ebp),%edi \n" +" movl 12(%ebp),%eax \n" +" testl %eax,%eax \n" +" jne 0f \n" +" incl %eax \n" +"0: \n" +" movl %eax,0(%edi) \n" +" movl 24(%edi),%ebp \n" +" pushfl \n" +" popl %ebx \n" +" movw 42(%edi),%ax \n" +" movw %ax,%ss \n" +" movl 28(%edi),%esp \n" +" pushl 32(%edi) \n" +" pushl %ebx \n" +" movw 36(%edi),%ax \n" +" movw %ax,%es \n" +#if 0 +/* fs is a system register in windows; don't muck with it */ +" movw 38(%edi),%ax \n" +" movw %ax,%fs \n" +#endif +" movw 40(%edi),%ax \n" +" movw %ax,%gs \n" +" movl 0(%edi),%eax \n" +" movl 4(%edi),%ebx \n" +" movl 8(%edi),%ecx \n" +" movl 12(%edi),%edx \n" +" movl 16(%edi),%esi \n" +" movl 20(%edi),%edi \n" +" popfl \n" +" ret \n"); +#endif + +#endif /* __i386__ */ |