4 # setjmp/longjmp for the x86-64 architecture
8 # The jmp_buf is assumed to contain the following, in order:
22 .type kernel_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
37 .size kernel_setjmp,.-kernel_setjmp
42 .type kernel_longjmp, @function
44 movl %esi,%eax # Return value (int)
54 .size kernel_longjmp,.-kernel_longjmp