1/* Copyright (C) 1996, 1997, 2000 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, see
16   <http://www.gnu.org/licenses/>.  */
17
18#include <sys/regdef.h>
19#include <sys/asm.h>
20
21/* The function __sigsetjmp_aux saves all the registers, but it can't
22   reliably access the stack or frame pointers, so we pass them in as
23   extra arguments.  */
24#ifdef __PIC__
25	.option pic2
26#endif
27
28
29.text
30.global __sigsetjmp
31.align 2;
32.ent __sigsetjmp,0;
33.type __sigsetjmp,@function
34
35__sigsetjmp:
36#ifdef __PIC__
37	.set	noreorder
38#if _MIPS_SIM == _MIPS_SIM_ABI32
39	.cpload	t9
40#else
41	.cpsetup t9, v0, __sigsetjmp
42#endif
43	.set	reorder
44#endif
45	move	a2, sp
46#ifdef fp
47	move	a3, fp
48#else
49	move	a3, $fp
50#endif
51#ifdef __PIC__
52	PTR_LA	t9, __sigsetjmp_aux
53#if _MIPS_SIM != _MIPS_SIM_ABI32
54	.cpreturn
55	move 	a4, gp
56#endif
57	jr	t9
58#else
59	j	__sigsetjmp_aux
60#endif
61	.end __sigsetjmp
62