remove all .size and .type directives for functions from the asm
[musl] / src / setjmp / x86_64 / longjmp.s
1 /* Copyright 2011 Nicholas J. Kain, licensed GNU LGPL 2.1 or later */
2 .global _longjmp
3 .global longjmp
4 _longjmp:
5 longjmp:
6         mov %rsi,%rax           /* val will be longjmp return */
7         test %rax,%rax
8         jnz 1f
9         inc %rax                /* if val==0, val=1 per longjmp semantics */
10 1:
11         mov (%rdi),%rbx         /* rdi is the jmp_buf, restore regs from it */
12         mov 8(%rdi),%rbp
13         mov 16(%rdi),%r12
14         mov 24(%rdi),%r13
15         mov 32(%rdi),%r14
16         mov 40(%rdi),%r15
17         mov 48(%rdi),%rdx       /* this ends up being the stack pointer */
18         mov %rdx,%rsp
19         mov 56(%rdi),%rdx       /* this is the instruction pointer */
20         jmp *%rdx               /* goto saved address without altering rsp */