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'. --- 12 unchanged lines hidden (view full) --- 58 movq %r14,48(%rax) /* 6; r14 */ 59 movq %r15,56(%rax) /* 7; r15 */ 60 fnstcw 64(%rax) /* 8; fpu cw */ 61 stmxcsr 68(%rax) /* and mxcsr */ 62 xorq %rax,%rax 63 ret 64END(_setjmp) 65 |
66 WEAK_REFERENCE(___longjmp, _longjmp) |
67ENTRY(___longjmp) 68 movq %rdi,%rdx 69 /* Restore the mxcsr, but leave exception flags intact. */ 70 stmxcsr -4(%rsp) 71 movl 68(%rdx),%eax 72 andl $0xffffffc0,%eax 73 movl -4(%rsp),%edi 74 andl $0x3f,%edi --- 21 unchanged lines hidden --- |