]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/sh/sh4/__longjmp.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / sh / sh4 / __longjmp.S
CommitLineData
3846ef75 1/* longjmp for SH.
b168057a 2 Copyright (C) 1999-2015 Free Software Foundation, Inc.
3846ef75
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
41bdb6e2
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.
3846ef75
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
41bdb6e2 13 Lesser General Public License for more details.
3846ef75 14
41bdb6e2 15 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
3846ef75
UD
18
19#include <sysdep.h>
20#define _SETJMP_H
21#define _ASM
22#include <bits/setjmp.h>
23
24/* __longjmp(jmpbuf, val) */
25
26ENTRY (__longjmp)
27 mov.l @r4+, r8
28 mov.l @r4+, r9
29 mov.l @r4+, r10
30 mov.l @r4+, r11
31 mov.l @r4+, r12
3846ef75
UD
32 mov r5, r0 /* get the return value in place */
33 tst r0, r0
34 bf.s 1f
a6df7387 35 mov.l @r4+, r13
3846ef75
UD
36 mov #1,r0 /* can't let setjmp() return zero! */
371:
d9038ff8
UD
38#ifdef PTR_DEMANGLE
39 mov.l @r4+, r2
a6df7387
UD
40 PTR_DEMANGLE (r2, r1)
41 mov r2, r14
42 mov.l @r4+, r2
43 PTR_DEMANGLE2 (r2, r1)
04733592
KK
44# ifdef CHECK_SP
45 CHECK_SP (r2)
46# endif
a6df7387
UD
47 mov r2, r15
48 mov.l @r4+, r2
49 PTR_DEMANGLE2 (r2, r1)
d9038ff8 50 lds r2, pr
a6df7387 51 mov #0, r1
d9038ff8 52#else
a6df7387 53 mov.l @r4+, r14
04733592
KK
54# ifdef CHECK_SP
55 mov.l @r4, r2
56 CHECK_SP (r2)
57# endif
a6df7387 58 mov.l @r4+, r15
d9038ff8
UD
59 lds.l @r4+, pr
60#endif
0899b889 61#ifdef __SH_FPU_ANY__
3846ef75
UD
62 ldc.l @r4+, gbr
63 lds.l @r4+, fpscr
64 fmov.s @r4+, fr12
65 fmov.s @r4+, fr13
66 fmov.s @r4+, fr14
67 rts
68 fmov.s @r4+, fr15
0899b889
UD
69#else
70 rts
71 ldc.l @r4+, gbr
72#endif /* !__SH_FPU_ANY__ */
3846ef75 73END (__longjmp)