Define bit_SSE2 and index_SSE2.
[glibc.git] / sysdeps / sh / ____longjmp_chk.S
blob2ff4f586efd4549318447d733229d0a6f06f65b9
1 /* Copyright (C) 2009 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
4    The GNU C Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 2.1 of the License, or (at your option) any later version.
9    The GNU C Library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Lesser General Public License for more details.
14    You should have received a copy of the GNU Lesser General Public
15    License along with the GNU C Library; if not, write to the Free
16    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17    02111-1307 USA.  */
19         .section .rodata.str1.1,"aMS",@progbits,1
20         .type   longjmp_msg,@object
21 longjmp_msg:
22         .string "longjmp causes uninitialized stack frame"
23         .size   longjmp_msg, .-longjmp_msg
24         .text
26 #define __longjmp ____longjmp_chk
28 #ifdef PIC
29 # define CALL_FAIL \
30         mov.l   .Lfail, r1;                             \
31         mov.l   .Lstr, r4;                              \
32         mova    .Lgot, r0;                              \
33         mov.l   .Lgot, r12;                             \
34         add     r0, r12;                                \
35         bsrf    r1;                                     \
36          add    r12, r4;                                \
37 .Lfail0:                                                \
38         bra     0f;                                     \
39          nop;                                           \
40         .align  2;                                      \
41 .Lgot:                                                  \
42         .long   _GLOBAL_OFFSET_TABLE_;                  \
43 .Lstr:                                                  \
44         .long   longjmp_msg@GOTOFF;                     \
45 .Lfail:                                                 \
46         .long   __GI___fortify_fail@PLT-(.Lfail0-.);    \
48 #else
49 # define CALL_FAIL \
50         mov.l   .Lfail, r1;                             \
51         mov.l   .Lstr, r4;                              \
52         jsr     @r1;                                    \
53          nop;                                           \
54         bra     0f;                                     \
55          nop;                                           \
56         .align  2;                                      \
57 .Lstr:                                                  \
58         .long   longjmp_msg;                            \
59 .Lfail:                                                 \
60         .long   __fortify_fail;                         \
62 #endif
64 #define CHECK_SP(reg) \
65         cmp/hs  r15, reg;                               \
66         bt      .Lok;                                   \
67         CALL_FAIL                                       \
68 .Lok:
70 #include <__longjmp.S>