OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / uClibc / libc / sysdeps / linux / sparc / setjmp.S
1 /* Copyright (C) 1991, 93, 94, 96, 97, 98 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
3
4    The GNU C Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 2.1 of the License, or (at your option) any later version.
8
9    The GNU C Library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Lesser General Public License for more details.
13
14    You should have received a copy of the GNU Lesser General Public
15    License along with the GNU C Library; if not, write to the Free
16    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17    02111-1307 USA.  */
18
19 #include <sys/syscall.h>
20
21 #define _ASM 1
22 #define _SETJMP_H
23 #include <bits/setjmp.h>
24 #define ST_FLUSH_WINDOWS 3
25
26 .global _setjmp
27 .type   _setjmp,%function
28 .align 4
29 _setjmp: 
30         b       1f
31         set     0, %o1
32 .size _setjmp,.-_setjmp
33
34
35
36
37
38 .global setjmp
39 .type   setjmp,%function
40 .align 4
41 setjmp: 
42         set     1, %o1
43 .size setjmp,.-setjmp
44
45
46
47
48
49 .global __sigsetjmp
50 .type   __sigsetjmp,%function
51 .align 4
52 __sigsetjmp: 
53 1:
54         /* Save our PC, SP and FP.  Save the signal mask if requested with
55            a tail-call for simplicity; it always returns zero.  */
56         ta      ST_FLUSH_WINDOWS
57
58         st      %o7, [%o0 + (JB_PC * 4)]
59         st      %sp, [%o0 + (JB_SP * 4)]
60         st      %fp, [%o0 + (JB_FP * 4)]
61
62         mov     %o7, %g1
63         call    __sigjmp_save
64         mov     %g1, %o7
65 .size __sigsetjmp,.-__sigsetjmp
66
67
68
69 .weak _setjmp
70 .weak setjmp