1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#if defined(LIBC_SCCS) && !defined(lint) 34 .asciz "@(#)setjmp.s 5.1 (Berkeley) 4/23/90" 35#endif /* LIBC_SCCS and not lint */ 36#include <machine/asm.h> |
37__FBSDID("$FreeBSD: head/lib/libc/amd64/gen/setjmp.S 258447 2013-11-21 21:25:58Z andreast $"); |
38 39/* 40 * C library -- _setjmp, _longjmp 41 * 42 * longjmp(a,v) 43 * will generate a "return(v)" from the last call to 44 * setjmp(a) 45 * by restoring registers from the environment 'a'. --- 22 unchanged lines hidden (view full) --- 68 movq %r14,48(%rcx) /* 6; r14 */ 69 movq %r15,56(%rcx) /* 7; r15 */ 70 fnstcw 64(%rcx) /* 8; fpu cw */ 71 stmxcsr 68(%rcx) /* and mxcsr */ 72 xorq %rax,%rax 73 ret 74END(setjmp) 75 |
76 WEAK_REFERENCE(__longjmp, longjmp) |
77ENTRY(__longjmp) 78 pushq %rdi 79 pushq %rsi 80 movq %rdi,%rdx 81 movq $3,%rdi /* SIG_SETMASK */ 82 leaq 72(%rdx),%rsi /* (sigset_t*)set */ 83 movq $0,%rdx /* (sigset_t*)oset */ 84 subq $0x8,%rsp /* make the stack 16-byte aligned */ --- 32 unchanged lines hidden --- |