Deleted Added
full compact
setjmp.S (114309) setjmp.S (114829)
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 114309 2003-04-30 18:09:33Z peter $");
41__FBSDID("$FreeBSD: head/lib/libc/amd64/gen/setjmp.S 114829 2003-05-08 06:25:03Z 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
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 leaq 72(%rcx),%rdi /* (sigset_t*)oset */
58 movq $1,%rdi /* SIG_BLOCK */
59 movq $0,%rsi /* (sigset_t*)set */
59 movq $0,%rsi /* (sigset_t*)set */
60 movq $1,%rdx /* SIG_BLOCK */
60 leaq 72(%rcx),%rdx /* (sigset_t*)oset */
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)

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

75 ret
76
77 .weak CNAME(longjmp)
78 .set CNAME(longjmp),CNAME(__longjmp)
79ENTRY(__longjmp)
80 pushq %rdi
81 pushq %rsi
82 movq %rdi,%rdx
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)

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

75 ret
76
77 .weak CNAME(longjmp)
78 .set CNAME(longjmp),CNAME(__longjmp)
79ENTRY(__longjmp)
80 pushq %rdi
81 pushq %rsi
82 movq %rdi,%rdx
83 movq $0,%rdi /* (sigset_t*)oset */
83 movq $1,%rdi /* SIG_SETMASK */
84 leaq 72(%rdx),%rsi /* (sigset_t*)set */
84 leaq 72(%rdx),%rsi /* (sigset_t*)set */
85 movq $3,%rdx /* SIG_SETMASK */
85 movq $0,%rdx /* (sigset_t*)oset */
86 call PIC_PLT(CNAME(_sigprocmask))
87 popq %rsi
88 popq %rdi /* jmpbuf */
89 movq %rdi,%rdx
90 movq %rsi,%rax /* retval */
91 movq 0(%rdx),%rcx
92 movq 8(%rdx),%rbx
93 movq 16(%rdx),%rsp

--- 12 unchanged lines hidden ---
86 call PIC_PLT(CNAME(_sigprocmask))
87 popq %rsi
88 popq %rdi /* jmpbuf */
89 movq %rdi,%rdx
90 movq %rsi,%rax /* retval */
91 movq 0(%rdx),%rcx
92 movq 8(%rdx),%rbx
93 movq 16(%rdx),%rsp

--- 12 unchanged lines hidden ---