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