Move all files into ports/ subdirectory in preparation for merge with glibc
[glibc.git] / ports / sysdeps / mips / mips64 / setjmp.S
blob25c0b72adde9aef1d80330e867ddb0f513cc5109
1 /* Copyright (C) 1996, 1997, 2000, 2002, 2003, 2004
2         Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
5    The GNU C Library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
10    The GNU C Library is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library.  If not, see
17    <http://www.gnu.org/licenses/>.  */
19 #include <sgidefs.h>
20 #include <sysdep.h>
21 #include <sys/asm.h>
23 /* The function __sigsetjmp_aux saves all the registers, but it can't
24    reliably access the stack or frame pointers, so we pass them in as
25    extra arguments.  */
26 #ifdef __PIC__
27         .option pic2
28 #endif
29 ENTRY (__sigsetjmp)
30 #ifdef __PIC__
31         SETUP_GP
32 #endif
33         SETUP_GP64 (v0, C_SYMBOL_NAME (__sigsetjmp))
34         move a2, sp
35         move a3, fp
36         PTR_LA t9, __sigsetjmp_aux
37 #if _MIPS_SIM == _ABIO32
38         nop
39 #endif  
40         RESTORE_GP64
41 #if _MIPS_SIM != _ABIO32
42         move a4, gp
43 #endif
44         jr t9
45         .end __sigsetjmp