1 /* Copyright (C) 2011-2018 Free Software Foundation, Inc.
2 
3    The GNU C Library is free software; you can redistribute it and/or
4    modify it under the terms of the GNU Lesser General Public
5    License as published by the Free Software Foundation; either
6    version 2.1 of the License, or (at your option) any later version.
7 
8    The GNU C Library is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11    Lesser General Public License for more details.
12 
13    You should have received a copy of the GNU Lesser General Public
14    License along with the GNU C Library.  If not, see
15    <http://www.gnu.org/licenses/>.  */
16 
17 /* We don't use most of these symbols; they are here for documentation. */
18 #define JB_R30  0
19 #define JB_R31  1
20 #define JB_R32  2
21 #define JB_R33  3
22 #define JB_R34  4
23 #define JB_R35  5
24 #define JB_R36  6
25 #define JB_R37  7
26 #define JB_R38  8
27 #define JB_R39  9
28 #define JB_R40  10
29 #define JB_R41  11
30 #define JB_R42  12
31 #define JB_R43  13
32 #define JB_R44  14
33 #define JB_R45  15
34 #define JB_R46  16
35 #define JB_R47  17
36 #define JB_R48  18
37 #define JB_R49  19
38 #define JB_R50  20
39 #define JB_R51  21
40 #define JB_FP   22  /* r52 */
41 #define JB_TP   23  /* r53 */
42 #define JB_SP   24  /* r54 */
43 #define JB_PC   25  /* normally LR, r55 */
44 #define JB_ICS  26  /* interrupt critical section bit */
45 
46 /* We save space for some extra state to accommodate future changes.  */
47 #define JB_LEN  32  /* number of words */
48 
49 #define JB_SIZE (JB_LEN * REGSIZE)
50 
51 /* Helper macro used by all the setjmp/longjmp assembly code. */
52 #define FOR_EACH_CALLEE_SAVED_REG(f)                              \
53   .no_require_canonical_reg_names;                f(r30); f(r31); \
54   f(r32); f(r33); f(r34); f(r35); f(r36); f(r37); f(r38); f(r39); \
55   f(r40); f(r41); f(r42); f(r43); f(r44); f(r45); f(r46); f(r47); \
56   f(r48); f(r49); f(r50); f(r51); f(r52); f(r53); f(r54); f(r55)
57 
58 /* Helper for generic ____longjmp_chk(). */
59 #define JB_FRAME_ADDRESS(buf) \
60   ((void *) (unsigned long) (buf[JB_SP]))
61