4 * setjmp/longjmp for the i386 architecture
8 * The jmp_buf is assumed to contain the following, in order:
21 .type _setjmp, @function
22 _setjmp: # gcc 4.0.1 wants this as an alias?
25 .type setjmp, @function
32 popl %ecx # Return address, and adjust the stack
33 xorl %eax,%eax # Return value
35 movl %esp,4(%edx) # Post-return %esp!
36 pushl %ecx # Make the call/return stack happy
40 movl %ecx,20(%edx) # Return address
48 .type longjmp, @function
53 movl 4(%esp),%edx # jmp_ptr address
54 movl 8(%esp),%eax # Return value
63 .size longjmp,.-longjmp
65 #if __SIZEOF_POINTER__ == 4
66 #include <i386/setjmp.S>
67 #elif __SIZEOF_POINTER__ == 8
68 #include <x86_64/setjmp.S>
70 #error "Unable to build for to-be-defined architecture type"