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 217106 2011-01-07 16:08:40Z kib $");
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 CNAME(_longjmp)
67 .set CNAME(_longjmp),CNAME(___longjmp)
68ENTRY(___longjmp)
69 movq %rdi,%rdx
70 /* Restore the mxcsr, but leave exception flags intact. */
71 stmxcsr -4(%rsp)
72 movl 68(%rdx),%eax
73 andl $0xffffffc0,%eax
74 movl -4(%rsp),%edi
75 andl $0x3f,%edi
--- 21 unchanged lines hidden ---
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 217106 2011-01-07 16:08:40Z kib $");
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 CNAME(_longjmp)
67 .set CNAME(_longjmp),CNAME(___longjmp)
68ENTRY(___longjmp)
69 movq %rdi,%rdx
70 /* Restore the mxcsr, but leave exception flags intact. */
71 stmxcsr -4(%rsp)
72 movl 68(%rdx),%eax
73 andl $0xffffffc0,%eax
74 movl -4(%rsp),%edi
75 andl $0x3f,%edi
--- 21 unchanged lines hidden ---