Update copyright notices with scripts/update-copyrights
[glibc.git] / ports / sysdeps / am33 / setjmp.S
blobd03b0c7278daa869eaa4afc685f0568118c37ef3
1 /* setjmp for am33.
2    Copyright (C) 2001-2014 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 <sysdep.h>
20 #define _ASM
21 #define _SETJMP_H
22 #include <bits/setjmp.h>
23 #include <asm-syntax.h>
26 ENTRY (__sigsetjmp)
27 .Lsigsetjmp:
28         /* Save registers.  */
29         mov d0,a0
30         mov d2,(0,a0)
31         mov d3,(4,a0)
32         mov mdr,d0
33         mov d0,(8,a0)
34         /* Restore d0 for __sigjmp_save.  */
35         mov a0,d0
36         mov a2,(12,a0)
37         mov a3,(16,a0)
38         mov sp,a1
39         mov a1,(20,a0)
40         add 24,a0
41         mov r4,(a0+)
42         mov r5,(a0+)
43         mov r6,(a0+)
44         mov r7,(a0+)
45 #ifdef __AM33_2__
46         fmov fs4,(a0+)
47         fmov fs5,(a0+)
48         fmov fs6,(a0+)
49         fmov fs7,(a0+)
50         fmov fs8,(a0+)
51         fmov fs9,(a0+)
52         fmov fs10,(a0+)
53         fmov fs11,(a0+)
54         fmov fs12,(a0+)
55         fmov fs13,(a0+)
56         fmov fs14,(a0+)
57         fmov fs15,(a0+)
58         fmov fs16,(a0+)
59         fmov fs17,(a0+)
60         fmov fs18,(a0+)
61         fmov fs19,(a0+)
62 #endif
63         /* Make a tail call to __sigjmp_save; it takes the same args.  */
64         jmp __sigjmp_save
65 END (__sigsetjmp)
67 /* BSD `_setjmp' entry point to `sigsetjmp (..., 1)'.  */
68 ENTRY (setjmp)
69         /* Tail-call setsetjmp with savesigs==1.  */
70         mov 1,d1
71         bra .Lsigsetjmp
72 END (setjmp)
74 /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'.  */
75 ENTRY (_setjmp)
76         /* Tail-call setsetjmp with savesigs==0.  */
77         clr d1
78         bra .Lsigsetjmp
79 END (_setjmp)