blob: 226f755247be488742e191bf167b69f0d8e50d22 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001/* 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, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
18
19#include <sys/regdef.h>
20#include <sys/asm.h>
21
22/* The function __sigsetjmp_aux saves all the registers, but it can't
23 reliably access the stack or frame pointers, so we pass them in as
24 extra arguments. */
25#ifdef __PIC__
26 .option pic2
27#endif
28
29
30.text
31.global __sigsetjmp
32.align 2;
33.ent __sigsetjmp,0;
34.type __sigsetjmp,@function
35
36__sigsetjmp:
37#ifdef __PIC__
38 .set noreorder
39#if _MIPS_SIM == _MIPS_SIM_ABI32
40 .cpload t9
41#else
42 .cpsetup t9, v0, __sigsetjmp
43#endif
44 .set reorder
45#endif
46 move a2, sp
47#ifdef fp
48 move a3, fp
49#else
50 move a3, $fp
51#endif
52#ifdef __PIC__
53 PTR_LA t9, __sigsetjmp_aux
54#if _MIPS_SIM != _MIPS_SIM_ABI32
55 .cpreturn
56#endif
57 jr t9
58#else
59 j __sigsetjmp_aux
60#endif
61 .end __sigsetjmp