]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/mips/mips64/bsd-_setjmp.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / mips / mips64 / bsd-_setjmp.S
CommitLineData
d0c2d3b3 1/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version.
04277e02 2 Copyright (C) 1996-2019 Free Software Foundation, Inc.
d0c2d3b3
UD
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
3214b89b
AJ
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.
d0c2d3b3
UD
9
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
3214b89b 13 Lesser General Public License for more details.
d0c2d3b3 14
3214b89b 15 You should have received a copy of the GNU Lesser General Public
ab84e3ff
PE
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
d0c2d3b3
UD
18
19/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
20 We cannot do it in C because it must be a tail-call, so frame-unwinding
21 in setjmp doesn't clobber the state restored by longjmp. */
22
b8ddf7a1 23#include <sgidefs.h>
d0c2d3b3 24#include <sysdep.h>
784c002b 25#include <sys/asm.h>
d0c2d3b3 26
5494bc3a 27#ifdef __PIC__
d0c2d3b3
UD
28 .option pic2
29#endif
30ENTRY (_setjmp)
5494bc3a 31#ifdef __PIC__
ca2b264c 32 SETUP_GP
d0c2d3b3 33#endif
aea7a9b9 34 SETUP_GP64_REG (v0, C_SYMBOL_NAME (_setjmp))
ca2b264c 35 PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp)
b8ddf7a1 36#if _MIPS_SIM == _ABIO32
d0c2d3b3 37 nop
5556231d 38#endif
aea7a9b9 39 RESTORE_GP64_REG
ca2b264c
AO
40 move a1, zero /* Pass a second argument of zero. */
41#ifdef __PIC__
42 jr t9
43#else
44 j C_SYMBOL_NAME (__sigsetjmp)
45#endif
a6ee1783 46END (_setjmp)
db160231 47libc_hidden_def (_setjmp)