2 * Special support for eabi and SVR4
4 * Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
5 * Copyright 2008 Freescale Semiconductor, Inc.
6 * Written By Michael Meissner
8 * Based on gcc/config/rs6000/crtsavres.asm from gcc
10 * This file is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2, or (at your option) any
15 * In addition to the permissions in the GNU General Public License, the
16 * Free Software Foundation gives you unlimited permission to link the
17 * compiled version of this file with other programs, and to distribute
18 * those programs without any restriction coming from the use of this
19 * file. (The General Public License restrictions do apply in other
20 * respects; for example, they cover modification of the file, and
21 * distribution when not linked into another program.)
23 * This file is distributed in the hope that it will be useful, but
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; see the file COPYING. If not, write to
30 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
31 * Boston, MA 02110-1301, USA.
33 * As a special exception, if you link this library with files
34 * compiled with GCC to produce an executable, this does not cause
35 * the resulting executable to be covered by the GNU General Public License.
36 * This exception does not however invalidate any other reasons why
37 * the executable file might be covered by the GNU General Public License.
40 #include <asm/ppc_asm.h>
45 #ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
47 /* Routines for saving integer registers, called by the compiler. */
48 /* Called with r11 pointing to the stack header word of the caller of the */
49 /* function, just beyond the end of the integer save area. */
52 _GLOBAL(_save32gpr_14)
53 stw 14,-72(11) /* save gp registers */
55 _GLOBAL(_save32gpr_15)
58 _GLOBAL(_save32gpr_16)
61 _GLOBAL(_save32gpr_17)
64 _GLOBAL(_save32gpr_18)
67 _GLOBAL(_save32gpr_19)
70 _GLOBAL(_save32gpr_20)
73 _GLOBAL(_save32gpr_21)
76 _GLOBAL(_save32gpr_22)
79 _GLOBAL(_save32gpr_23)
82 _GLOBAL(_save32gpr_24)
85 _GLOBAL(_save32gpr_25)
88 _GLOBAL(_save32gpr_26)
91 _GLOBAL(_save32gpr_27)
94 _GLOBAL(_save32gpr_28)
97 _GLOBAL(_save32gpr_29)
100 _GLOBAL(_save32gpr_30)
103 _GLOBAL(_save32gpr_31)
107 /* Routines for restoring integer registers, called by the compiler. */
108 /* Called with r11 pointing to the stack header word of the caller of the */
109 /* function, just beyond the end of the integer restore area. */
112 _GLOBAL(_rest32gpr_14)
113 lwz 14,-72(11) /* restore gp registers */
115 _GLOBAL(_rest32gpr_15)
118 _GLOBAL(_rest32gpr_16)
121 _GLOBAL(_rest32gpr_17)
124 _GLOBAL(_rest32gpr_18)
127 _GLOBAL(_rest32gpr_19)
130 _GLOBAL(_rest32gpr_20)
133 _GLOBAL(_rest32gpr_21)
136 _GLOBAL(_rest32gpr_22)
139 _GLOBAL(_rest32gpr_23)
142 _GLOBAL(_rest32gpr_24)
145 _GLOBAL(_rest32gpr_25)
148 _GLOBAL(_rest32gpr_26)
151 _GLOBAL(_rest32gpr_27)
154 _GLOBAL(_rest32gpr_28)
157 _GLOBAL(_rest32gpr_29)
160 _GLOBAL(_rest32gpr_30)
163 _GLOBAL(_rest32gpr_31)
167 /* Routines for restoring integer registers, called by the compiler. */
168 /* Called with r11 pointing to the stack header word of the caller of the */
169 /* function, just beyond the end of the integer restore area. */
171 _GLOBAL(_restgpr_14_x)
172 _GLOBAL(_rest32gpr_14_x)
173 lwz 14,-72(11) /* restore gp registers */
174 _GLOBAL(_restgpr_15_x)
175 _GLOBAL(_rest32gpr_15_x)
177 _GLOBAL(_restgpr_16_x)
178 _GLOBAL(_rest32gpr_16_x)
180 _GLOBAL(_restgpr_17_x)
181 _GLOBAL(_rest32gpr_17_x)
183 _GLOBAL(_restgpr_18_x)
184 _GLOBAL(_rest32gpr_18_x)
186 _GLOBAL(_restgpr_19_x)
187 _GLOBAL(_rest32gpr_19_x)
189 _GLOBAL(_restgpr_20_x)
190 _GLOBAL(_rest32gpr_20_x)
192 _GLOBAL(_restgpr_21_x)
193 _GLOBAL(_rest32gpr_21_x)
195 _GLOBAL(_restgpr_22_x)
196 _GLOBAL(_rest32gpr_22_x)
198 _GLOBAL(_restgpr_23_x)
199 _GLOBAL(_rest32gpr_23_x)
201 _GLOBAL(_restgpr_24_x)
202 _GLOBAL(_rest32gpr_24_x)
204 _GLOBAL(_restgpr_25_x)
205 _GLOBAL(_rest32gpr_25_x)
207 _GLOBAL(_restgpr_26_x)
208 _GLOBAL(_rest32gpr_26_x)
210 _GLOBAL(_restgpr_27_x)
211 _GLOBAL(_rest32gpr_27_x)
213 _GLOBAL(_restgpr_28_x)
214 _GLOBAL(_rest32gpr_28_x)
216 _GLOBAL(_restgpr_29_x)
217 _GLOBAL(_rest32gpr_29_x)
219 _GLOBAL(_restgpr_30_x)
220 _GLOBAL(_rest32gpr_30_x)
222 _GLOBAL(_restgpr_31_x)
223 _GLOBAL(_rest32gpr_31_x)