4 # setjmp/longjmp for the x86-64 architecture
8 # The jmp_buf is assumed to contain the following, in order:
22 .type setjmp, @function
24 pop %rsi # Return address, and adjust the stack
25 xorl %eax,%eax # Return value
27 movq %rsp,8(%rdi) # Post-return %rsp!
28 push %rsi # Make the call/return stack happy
34 movq %rsi,56(%rdi) # Return address
42 .type longjmp, @function
44 movl %esi,%eax # Return value (int)
54 .size longjmp,.-longjmp