sigsetjmp.S (267307) | sigsetjmp.S (287292) |
---|---|
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 --- 23 unchanged lines hidden (view full) --- 32 * @(#)setjmp.s 5.1 (Berkeley) 4/23/90" 33 */ 34 35#if defined(LIBC_SCCS) && !defined(lint) 36 .text 37 .asciz "$Id: sigsetjmp.S,v 1.1 1993/12/05 13:01:05 ats Exp $" 38#endif /* LIBC_SCCS and not lint */ 39#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 --- 23 unchanged lines hidden (view full) --- 32 * @(#)setjmp.s 5.1 (Berkeley) 4/23/90" 33 */ 34 35#if defined(LIBC_SCCS) && !defined(lint) 36 .text 37 .asciz "$Id: sigsetjmp.S,v 1.1 1993/12/05 13:01:05 ats Exp $" 38#endif /* LIBC_SCCS and not lint */ 39#include <machine/asm.h> |
40__FBSDID("$FreeBSD: head/lib/libc/i386/gen/sigsetjmp.S 267307 2014-06-09 21:35:36Z jilles $"); | 40__FBSDID("$FreeBSD: head/lib/libc/i386/gen/sigsetjmp.S 287292 2015-08-29 14:25:01Z kib $"); |
41 42#include "SYS.h" 43 44/*- 45 * TODO: 46 * Rename sigsetjmp to __sigsetjmp and siglongjmp to __siglongjmp, 47 * remove the other *jmp functions and define everything in terms 48 * of the renamed functions. This requires compiler support for --- 5 unchanged lines hidden (view full) --- 54 */ 55 56ENTRY(sigsetjmp) 57 movl 8(%esp),%eax 58 movl 4(%esp),%ecx 59 movl %eax,44(%ecx) 60 testl %eax,%eax 61 jz 2f | 41 42#include "SYS.h" 43 44/*- 45 * TODO: 46 * Rename sigsetjmp to __sigsetjmp and siglongjmp to __siglongjmp, 47 * remove the other *jmp functions and define everything in terms 48 * of the renamed functions. This requires compiler support for --- 5 unchanged lines hidden (view full) --- 54 */ 55 56ENTRY(sigsetjmp) 57 movl 8(%esp),%eax 58 movl 4(%esp),%ecx 59 movl %eax,44(%ecx) 60 testl %eax,%eax 61 jz 2f |
62 PIC_PROLOGUE 63#ifdef PIC 64 subl $12,%esp /* make the stack 16-byte aligned */ 65#endif | |
66 leal 28(%ecx), %eax 67 pushl %eax /* (sigset_t*)oset */ 68 pushl $0 /* (sigset_t*)set */ 69 pushl $1 /* SIG_BLOCK */ | 62 leal 28(%ecx), %eax 63 pushl %eax /* (sigset_t*)oset */ 64 pushl $0 /* (sigset_t*)set */ 65 pushl $1 /* SIG_BLOCK */ |
70 call PIC_PLT(CNAME(_sigprocmask)) 71#ifdef PIC 72 addl $24,%esp 73#else | 66 call __libc_sigprocmask |
74 addl $12,%esp | 67 addl $12,%esp |
75#endif 76 PIC_EPILOGUE | |
77 movl 4(%esp),%ecx 782: movl 0(%esp),%edx 79 movl %edx, 0(%ecx) 80 movl %ebx, 4(%ecx) 81 movl %esp, 8(%ecx) 82 movl %ebp,12(%ecx) 83 movl %esi,16(%ecx) 84 movl %edi,20(%ecx) 85 fnstcw 24(%ecx) 86 xorl %eax,%eax 87 ret 88END(sigsetjmp) 89 90 WEAK_REFERENCE(__siglongjmp, siglongjmp) 91ENTRY(__siglongjmp) 92 movl 4(%esp),%edx 93 cmpl $0,44(%edx) 94 jz 2f | 68 movl 4(%esp),%ecx 692: movl 0(%esp),%edx 70 movl %edx, 0(%ecx) 71 movl %ebx, 4(%ecx) 72 movl %esp, 8(%ecx) 73 movl %ebp,12(%ecx) 74 movl %esi,16(%ecx) 75 movl %edi,20(%ecx) 76 fnstcw 24(%ecx) 77 xorl %eax,%eax 78 ret 79END(sigsetjmp) 80 81 WEAK_REFERENCE(__siglongjmp, siglongjmp) 82ENTRY(__siglongjmp) 83 movl 4(%esp),%edx 84 cmpl $0,44(%edx) 85 jz 2f |
95 PIC_PROLOGUE 96#ifdef PIC 97 subl $12,%esp /* make the stack 16-byte aligned */ 98#endif | |
99 pushl $0 /* (sigset_t*)oset */ 100 leal 28(%edx), %eax 101 pushl %eax /* (sigset_t*)set */ 102 pushl $3 /* SIG_SETMASK */ | 86 pushl $0 /* (sigset_t*)oset */ 87 leal 28(%edx), %eax 88 pushl %eax /* (sigset_t*)set */ 89 pushl $3 /* SIG_SETMASK */ |
103 call PIC_PLT(CNAME(_sigprocmask)) 104#ifdef PIC 105 addl $24,%esp 106#else | 90 call __libc_sigprocmask |
107 addl $12,%esp | 91 addl $12,%esp |
108#endif 109 PIC_EPILOGUE | |
110 movl 4(%esp),%edx 1112: movl 8(%esp),%eax 112 movl 0(%edx),%ecx 113 movl 4(%edx),%ebx 114 movl 8(%edx),%esp 115 movl 12(%edx),%ebp 116 movl 16(%edx),%esi 117 movl 20(%edx),%edi 118 fldcw 24(%edx) 119 testl %eax,%eax 120 jnz 1f 121 incl %eax 1221: movl %ecx,0(%esp) 123 ret 124END(__siglongjmp) 125 126 .section .note.GNU-stack,"",%progbits | 92 movl 4(%esp),%edx 932: movl 8(%esp),%eax 94 movl 0(%edx),%ecx 95 movl 4(%edx),%ebx 96 movl 8(%edx),%esp 97 movl 12(%edx),%ebp 98 movl 16(%edx),%esi 99 movl 20(%edx),%edi 100 fldcw 24(%edx) 101 testl %eax,%eax 102 jnz 1f 103 incl %eax 1041: movl %ecx,0(%esp) 105 ret 106END(__siglongjmp) 107 108 .section .note.GNU-stack,"",%progbits |