Deleted Added
full compact
setjmp.S (114835) setjmp.S (115745)
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

--- 24 unchanged lines hidden (view full) ---

33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#if defined(LIBC_SCCS) && !defined(lint)
38 .asciz "@(#)setjmp.s 5.1 (Berkeley) 4/23/90"
39#endif /* LIBC_SCCS and not lint */
40#include <machine/asm.h>
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

--- 24 unchanged lines hidden (view full) ---

33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#if defined(LIBC_SCCS) && !defined(lint)
38 .asciz "@(#)setjmp.s 5.1 (Berkeley) 4/23/90"
39#endif /* LIBC_SCCS and not lint */
40#include <machine/asm.h>
41__FBSDID("$FreeBSD: head/lib/libc/amd64/gen/setjmp.S 114835 2003-05-08 07:41:24Z peter $");
41__FBSDID("$FreeBSD: head/lib/libc/amd64/gen/setjmp.S 115745 2003-06-02 22:37:53Z peter $");
42
43/*
44 * C library -- _setjmp, _longjmp
45 *
46 * longjmp(a,v)
47 * will generate a "return(v)" from the last call to
48 * setjmp(a)
49 * by restoring registers from the environment 'a'.
50 * The previous signal state is restored.
51 */
52
53#include "SYS.h"
54
55ENTRY(setjmp)
56 pushq %rdi
57 movq %rdi,%rcx
58 movq $1,%rdi /* SIG_BLOCK */
59 movq $0,%rsi /* (sigset_t*)set */
42
43/*
44 * C library -- _setjmp, _longjmp
45 *
46 * longjmp(a,v)
47 * will generate a "return(v)" from the last call to
48 * setjmp(a)
49 * by restoring registers from the environment 'a'.
50 * The previous signal state is restored.
51 */
52
53#include "SYS.h"
54
55ENTRY(setjmp)
56 pushq %rdi
57 movq %rdi,%rcx
58 movq $1,%rdi /* SIG_BLOCK */
59 movq $0,%rsi /* (sigset_t*)set */
60 leaq 72(%rcx),%rdx /* (sigset_t*)oset */
60 leaq 72(%rcx),%rdx /* 9,10; (sigset_t*)oset */
61 call PIC_PLT(CNAME(_sigprocmask))
62 popq %rdi
63 movq %rdi,%rcx
64 movq 0(%rsp),%rdx /* retval */
61 call PIC_PLT(CNAME(_sigprocmask))
62 popq %rdi
63 movq %rdi,%rcx
64 movq 0(%rsp),%rdx /* retval */
65 movq %rdx, 0(%rcx) /* retval */
66 movq %rbx, 8(%rcx)
67 movq %rsp,16(%rcx)
68 movq %rbp,24(%rcx)
69 movq %r12,32(%rcx)
70 movq %r13,40(%rcx)
71 movq %r14,48(%rcx)
72 movq %r15,56(%rcx)
73 fnstcw 64(%rcx)
65 movq %rdx, 0(%rcx) /* 0; retval */
66 movq %rbx, 8(%rcx) /* 1; rbx */
67 movq %rsp,16(%rcx) /* 2; rsp */
68 movq %rbp,24(%rcx) /* 3; rbp */
69 movq %r12,32(%rcx) /* 4; r12 */
70 movq %r13,40(%rcx) /* 5; r13 */
71 movq %r14,48(%rcx) /* 6; r14 */
72 movq %r15,56(%rcx) /* 7; r15 */
73 fnstcw 64(%rcx) /* 8; fpu cw */
74 xorq %rax,%rax
75 ret
76
77 .weak CNAME(longjmp)
78 .set CNAME(longjmp),CNAME(__longjmp)
79ENTRY(__longjmp)
80 pushq %rdi
81 pushq %rsi

--- 24 unchanged lines hidden ---
74 xorq %rax,%rax
75 ret
76
77 .weak CNAME(longjmp)
78 .set CNAME(longjmp),CNAME(__longjmp)
79ENTRY(__longjmp)
80 pushq %rdi
81 pushq %rsi

--- 24 unchanged lines hidden ---