1 /* Copyright 2011 Nicholas J. Kain, licensed GNU LGPL 2.1 or later */
6 mov %rsi,%rax /* val will be longjmp return */
9 inc %rax /* if val==0, val=1 per longjmp semantics */
11 mov (%rdi),%rbx /* rdi is the jmp_buf, restore regs from it */
17 mov 48(%rdi),%rdx /* this ends up being the stack pointer */
19 mov 56(%rdi),%rdx /* this is the instruction pointer */
20 jmp *%rdx /* goto saved address without altering rsp */