2.9
[glibc/nacl-glibc.git] / sysdeps / powerpc / powerpc64 / bsd-_setjmp.S
blob82b79a80986fa449c59ab669e9a4b69a2777cca8
1 /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'.  PowerPC32/64 version.
2    Copyright (C) 1994, 1997, 1999, 2000, 2002, 2003, 2004
3    Free Software Foundation, Inc.
4    This file is part of the GNU C Library.
6    The GNU C Library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
11    The GNU C Library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
16    You should have received a copy of the GNU Lesser General Public
17    License along with the GNU C Library; if not, write to the Free
18    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19    02111-1307 USA.  */
20 #include <shlib-compat.h>
21 #include <libc-symbols.h>
22 #include <sysdep.h>
23 #include <bp-sym.h>
25 #if defined NOT_IN_libc
26 /* Build a non-versioned object for rtld-*.  */
27 ENTRY (BP_SYM (_setjmp))
28         CALL_MCOUNT 1
29         li r4,0                 /* Set second argument to 0.  */
30         b JUMPTARGET (__sigsetjmp_ent)
31 END (BP_SYM (_setjmp))
32 libc_hidden_def (_setjmp)
34 #else
35 /* Build a versioned object for libc.  */
36 # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)
37 symbol_version (__novmx_setjmp,_setjmp,GLIBC_2.3);
39 ENTRY (BP_SYM (__novmx_setjmp))
40         CALL_MCOUNT 1
41         li r4,0                 /* Set second argument to 0.  */
42         b JUMPTARGET (__novmx__sigsetjmp_ent)
43 END (BP_SYM (__novmx_setjmp))
44 libc_hidden_def (__novmx_setjmp)
45 # endif /* defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4) */
47 default_symbol_version (__vmx_setjmp,_setjmp,GLIBC_2.3.4)
48 /* __GI__setjmp prototype is needed for ntpl i.e. _setjmp is defined
49    as a libc_hidden_proto & is used in sysdeps/generic/libc-start.c
50    if HAVE_CLEANUP_JMP_BUF is defined */
51 ENTRY (BP_SYM (__GI__setjmp))
52 #if defined SHARED && !defined IS_IN_rtld
53         std r2,40(r1)   /* Save the callers TOC in the save area.  */
54 #endif
55         CALL_MCOUNT 1
56         li r4,0                 /* Set second argument to 0.  */
57         b JUMPTARGET (__vmx__sigsetjmp_ent)
58 END (BP_SYM (__GI__setjmp))
60 ENTRY (BP_SYM (__vmx_setjmp))
61         CALL_MCOUNT 1
62         li r4,0                 /* Set second argument to 0.  */
63         b JUMPTARGET (__vmx__sigsetjmp_ent)
64 END (BP_SYM (__vmx_setjmp))
65 libc_hidden_def (__vmx_setjmp)
66 #endif /* !NOT_IN_libc */