Update.
[glibc.git] / sysdeps / cris / setjmp.S
blobd773ac94d696b08d1476de47303b7dff0bc0efe2
1 /* setjmp for CRIS.
2    Copyright (C) 2001 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 Library General Public License as
7    published by the Free Software Foundation; either version 2 of the
8    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    Library General Public License for more details.
15    You should have received a copy of the GNU Library General Public
16    License along with the GNU C Library; see the file COPYING.LIB.  If not,
17    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18    Boston, MA 02111-1307, USA.  */
20 #include <sysdep.h>
21 #define _SETJMP_H
22 #define _ASM
23 #include <bits/setjmp.h>
25         .syntax no_register_prefix
27 ENTRY (__sigsetjmp)
28 .Local__sigsetjmp:      
29         moveq 1,r9
30         movem sp,[r10+1*4]
31 #ifdef __PIC__
32         move.d pc,r9
33         addq 0f-.,r9
34 #else
35         move.d 0f,r9
36 #endif
37         move.d r9,[r10]
38         move srp,[r10+16*4]
39         move ccr,[r10+17*4]
40         PLTJUMP (__sigjmp_save)
41 0: /* This is where longjmp returns.  (Don't use "ret" - it's a macro.  */
42         Ret
43         move.d r9,r10
44 END (__sigsetjmp)
46 /* Binary compatibility entry points.  Having these in separate files
47    is not meaningful and just adds library overhead.  */
49 ENTRY (__setjmp)
50         ba .Local__sigsetjmp
51         moveq 0,r11
52 END (__setjmp)
54 ENTRY (_setjmp)
55         ba .Local__sigsetjmp
56         moveq 0,r11
57 END (_setjmp)
59 ENTRY (setjmp)
60         ba .Local__sigsetjmp
61         moveq 1,r11
62 END (setjmp)
64 weak_extern (__setjmp)
65 weak_extern (_setjmp)
66 weak_extern (setjmp)