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.
41 #error "On PPC64, FPR save/restore functions are provided by the linker."
47 #define _GLOBAL(name) \
48 .type name,@function; \
52 /* Routines for saving integer registers, called by the compiler. */
53 /* Called with r11 pointing to the stack header word of the caller of the */
54 /* function, just beyond the end of the integer save area. */
57 _GLOBAL(_save32gpr_14)
58 stw 14,-72(11) /* save gp registers */
60 _GLOBAL(_save32gpr_15)
63 _GLOBAL(_save32gpr_16)
66 _GLOBAL(_save32gpr_17)
69 _GLOBAL(_save32gpr_18)
72 _GLOBAL(_save32gpr_19)
75 _GLOBAL(_save32gpr_20)
78 _GLOBAL(_save32gpr_21)
81 _GLOBAL(_save32gpr_22)
84 _GLOBAL(_save32gpr_23)
87 _GLOBAL(_save32gpr_24)
90 _GLOBAL(_save32gpr_25)
93 _GLOBAL(_save32gpr_26)
96 _GLOBAL(_save32gpr_27)
99 _GLOBAL(_save32gpr_28)
102 _GLOBAL(_save32gpr_29)
105 _GLOBAL(_save32gpr_30)
108 _GLOBAL(_save32gpr_31)
112 /* Routines for restoring integer registers, called by the compiler. */
113 /* Called with r11 pointing to the stack header word of the caller of the */
114 /* function, just beyond the end of the integer restore area. */
117 _GLOBAL(_rest32gpr_14)
118 lwz 14,-72(11) /* restore gp registers */
120 _GLOBAL(_rest32gpr_15)
123 _GLOBAL(_rest32gpr_16)
126 _GLOBAL(_rest32gpr_17)
129 _GLOBAL(_rest32gpr_18)
132 _GLOBAL(_rest32gpr_19)
135 _GLOBAL(_rest32gpr_20)
138 _GLOBAL(_rest32gpr_21)
141 _GLOBAL(_rest32gpr_22)
144 _GLOBAL(_rest32gpr_23)
147 _GLOBAL(_rest32gpr_24)
150 _GLOBAL(_rest32gpr_25)
153 _GLOBAL(_rest32gpr_26)
156 _GLOBAL(_rest32gpr_27)
159 _GLOBAL(_rest32gpr_28)
162 _GLOBAL(_rest32gpr_29)
165 _GLOBAL(_rest32gpr_30)
168 _GLOBAL(_rest32gpr_31)
172 /* Routines for restoring integer registers, called by the compiler. */
173 /* Called with r11 pointing to the stack header word of the caller of the */
174 /* function, just beyond the end of the integer restore area. */
176 _GLOBAL(_restgpr_14_x)
177 _GLOBAL(_rest32gpr_14_x)
178 lwz 14,-72(11) /* restore gp registers */
179 _GLOBAL(_restgpr_15_x)
180 _GLOBAL(_rest32gpr_15_x)
182 _GLOBAL(_restgpr_16_x)
183 _GLOBAL(_rest32gpr_16_x)
185 _GLOBAL(_restgpr_17_x)
186 _GLOBAL(_rest32gpr_17_x)
188 _GLOBAL(_restgpr_18_x)
189 _GLOBAL(_rest32gpr_18_x)
191 _GLOBAL(_restgpr_19_x)
192 _GLOBAL(_rest32gpr_19_x)
194 _GLOBAL(_restgpr_20_x)
195 _GLOBAL(_rest32gpr_20_x)
197 _GLOBAL(_restgpr_21_x)
198 _GLOBAL(_rest32gpr_21_x)
200 _GLOBAL(_restgpr_22_x)
201 _GLOBAL(_rest32gpr_22_x)
203 _GLOBAL(_restgpr_23_x)
204 _GLOBAL(_rest32gpr_23_x)
206 _GLOBAL(_restgpr_24_x)
207 _GLOBAL(_rest32gpr_24_x)
209 _GLOBAL(_restgpr_25_x)
210 _GLOBAL(_rest32gpr_25_x)
212 _GLOBAL(_restgpr_26_x)
213 _GLOBAL(_rest32gpr_26_x)
215 _GLOBAL(_restgpr_27_x)
216 _GLOBAL(_rest32gpr_27_x)
218 _GLOBAL(_restgpr_28_x)
219 _GLOBAL(_rest32gpr_28_x)
221 _GLOBAL(_restgpr_29_x)
222 _GLOBAL(_rest32gpr_29_x)
224 _GLOBAL(_restgpr_30_x)
225 _GLOBAL(_rest32gpr_30_x)
227 _GLOBAL(_restgpr_31_x)
228 _GLOBAL(_rest32gpr_31_x)