(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / sh / sh3 / setjmp.S
blob819543a08ce46b0f51f136676a03c5a56019c203
1 /* setjmp for SH3.
2    Copyright (C) 1999, 2000 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, write to the Free
17    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18    02111-1307 USA.  */
20 #include <sysdep.h>
21 #define _SETJMP_H
22 #define _ASM
23 #include <bits/setjmp.h>
25 ENTRY (__sigsetjmp)
26         /* Save registers */
27         add     #(JB_SIZE - 4 * 5), r4
28         stc.l   gbr, @-r4
29         sts.l   pr, @-r4
30         mov.l   r15, @-r4
31         mov.l   r14, @-r4
32         mov.l   r13, @-r4
33         mov.l   r12, @-r4
34         mov.l   r11, @-r4
35         mov.l   r10, @-r4
36         mov.l   r9, @-r4
37         mov.l   r8, @-r4
39         /* Make a tail call to __sigjmp_save; it takes the same args.  */
40 #ifdef SHARED
41         mov.l   1f, r1
42         mova    1f, r0
43         bra     2f
44          add    r1, r0
45         .align  2
47         .long   _GLOBAL_OFFSET_TABLE_
49         mov.l   .L1, r1
50         mov.l   @(r0,r1), r1
51         jmp     @r1
52          nop
53         .align  2
54 .L1:
55         .long   C_SYMBOL_NAME(__sigjmp_save@GOT)
56 #else
57         mov.l   .L1, r1
58         jmp     @r1
59          nop
60         .align  2
61 .L1:
62         .long   C_SYMBOL_NAME(__sigjmp_save)
63 #endif
64 END (__sigsetjmp)