2 * Special support for eabi
and SVR4
4 * Copyright
(C
) 1995, 1996, 1998, 2000, 2001 Free Software Foundation
, Inc.
5 * Written By Michael Meissner
6 * 64-bit support written by David Edelsohn
8 * This file is free software
; you can redistribute it and/or modify it
9 * under the terms of the GNU General
Public License as published by the
10 * Free Software Foundation
; either version 2, or (at your option) any
13 * In addition to the permissions
in the GNU General
Public License
, the
14 * Free Software Foundation gives you unlimited permission to link the
15 * compiled version of
this file with other programs
, and to distribute
16 * those programs without any restriction coming from the use of
this
17 * file.
(The General
Public License restrictions do apply
in other
18 * respects
; for example, they cover modification of the file, and
19 * distribution when
not linked
into another program.
)
21 * This file is distributed
in the hope that it will be useful
, but
22 * WITHOUT ANY WARRANTY
; without even the implied warranty of
23 * MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * General
Public License for more details.
26 * You should have received a copy of the GNU General
Public License
27 * along with
this program
; see the file COPYING. If not, write to
28 * the Free Software Foundation
, 51 Franklin Street
, Fifth Floor
,
29 * Boston
, MA
02110-1301, USA.
31 * As a special exception
, if you link
this library with files
32 * compiled with GCC to produce an executable
, this does
not cause
33 * the resulting executable to be covered by the GNU General
Public License.
34 * This exception does
not however invalidate any other reasons why
35 * the executable file might be covered by the GNU General
Public License.
38 /* Do any initializations needed for the eabi environment
*/
44 /* On PowerPC64 Linux
, these functions are provided by the linker.
*/
47 /* Routines for saving floating point 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 floating point save area.
*/
51 FUNC_START
(_savefpr_14
) stfd
14,-144(11) /* save fp registers
*/
52 FUNC_START
(_savefpr_15
) stfd
15,-136(11)
53 FUNC_START
(_savefpr_16
) stfd
16,-128(11)
54 FUNC_START
(_savefpr_17
) stfd
17,-120(11)
55 FUNC_START
(_savefpr_18
) stfd
18,-112(11)
56 FUNC_START
(_savefpr_19
) stfd
19,-104(11)
57 FUNC_START
(_savefpr_20
) stfd
20,-96(11)
58 FUNC_START
(_savefpr_21
) stfd
21,-88(11)
59 FUNC_START
(_savefpr_22
) stfd
22,-80(11)
60 FUNC_START
(_savefpr_23
) stfd
23,-72(11)
61 FUNC_START
(_savefpr_24
) stfd
24,-64(11)
62 FUNC_START
(_savefpr_25
) stfd
25,-56(11)
63 FUNC_START
(_savefpr_26
) stfd
26,-48(11)
64 FUNC_START
(_savefpr_27
) stfd
27,-40(11)
65 FUNC_START
(_savefpr_28
) stfd
28,-32(11)
66 FUNC_START
(_savefpr_29
) stfd
29,-24(11)
67 FUNC_START
(_savefpr_30
) stfd
30,-16(11)
68 FUNC_START
(_savefpr_31
) stfd
31,-8(11)
89 /* Routines for saving integer registers
, called by the compiler.
*/
90 /* Called with r11 pointing to the stack header
word of the caller of the
*/
91 /* function
, just beyond the
end of the integer save area.
*/
93 FUNC_START
(_savegpr_14
) stw
14,-72(11) /* save gp registers
*/
94 FUNC_START
(_savegpr_15
) stw
15,-68(11)
95 FUNC_START
(_savegpr_16
) stw
16,-64(11)
96 FUNC_START
(_savegpr_17
) stw
17,-60(11)
97 FUNC_START
(_savegpr_18
) stw
18,-56(11)
98 FUNC_START
(_savegpr_19
) stw
19,-52(11)
99 FUNC_START
(_savegpr_20
) stw
20,-48(11)
100 FUNC_START
(_savegpr_21
) stw
21,-44(11)
101 FUNC_START
(_savegpr_22
) stw
22,-40(11)
102 FUNC_START
(_savegpr_23
) stw
23,-36(11)
103 FUNC_START
(_savegpr_24
) stw
24,-32(11)
104 FUNC_START
(_savegpr_25
) stw
25,-28(11)
105 FUNC_START
(_savegpr_26
) stw
26,-24(11)
106 FUNC_START
(_savegpr_27
) stw
27,-20(11)
107 FUNC_START
(_savegpr_28
) stw
28,-16(11)
108 FUNC_START
(_savegpr_29
) stw
29,-12(11)
109 FUNC_START
(_savegpr_30
) stw
30,-8(11)
110 FUNC_START
(_savegpr_31
) stw
31,-4(11)
112 FUNC_END
(_savegpr_31
)
113 FUNC_END
(_savegpr_30
)
114 FUNC_END
(_savegpr_29
)
115 FUNC_END
(_savegpr_28
)
116 FUNC_END
(_savegpr_27
)
117 FUNC_END
(_savegpr_26
)
118 FUNC_END
(_savegpr_25
)
119 FUNC_END
(_savegpr_24
)
120 FUNC_END
(_savegpr_23
)
121 FUNC_END
(_savegpr_22
)
122 FUNC_END
(_savegpr_21
)
123 FUNC_END
(_savegpr_20
)
124 FUNC_END
(_savegpr_19
)
125 FUNC_END
(_savegpr_18
)
126 FUNC_END
(_savegpr_17
)
127 FUNC_END
(_savegpr_16
)
128 FUNC_END
(_savegpr_15
)
129 FUNC_END
(_savegpr_14
)
131 /* Routines for restoring floating point registers
, called by the compiler.
*/
132 /* Called with r11 pointing to the stack header
word of the caller of the
*/
133 /* function
, just beyond the
end of the floating point save area.
*/
135 FUNC_START
(_restfpr_14
) lfd
14,-144(11) /* restore fp registers
*/
136 FUNC_START
(_restfpr_15
) lfd
15,-136(11)
137 FUNC_START
(_restfpr_16
) lfd
16,-128(11)
138 FUNC_START
(_restfpr_17
) lfd
17,-120(11)
139 FUNC_START
(_restfpr_18
) lfd
18,-112(11)
140 FUNC_START
(_restfpr_19
) lfd
19,-104(11)
141 FUNC_START
(_restfpr_20
) lfd
20,-96(11)
142 FUNC_START
(_restfpr_21
) lfd
21,-88(11)
143 FUNC_START
(_restfpr_22
) lfd
22,-80(11)
144 FUNC_START
(_restfpr_23
) lfd
23,-72(11)
145 FUNC_START
(_restfpr_24
) lfd
24,-64(11)
146 FUNC_START
(_restfpr_25
) lfd
25,-56(11)
147 FUNC_START
(_restfpr_26
) lfd
26,-48(11)
148 FUNC_START
(_restfpr_27
) lfd
27,-40(11)
149 FUNC_START
(_restfpr_28
) lfd
28,-32(11)
150 FUNC_START
(_restfpr_29
) lfd
29,-24(11)
151 FUNC_START
(_restfpr_30
) lfd
30,-16(11)
152 FUNC_START
(_restfpr_31
) lfd
31,-8(11)
154 FUNC_END
(_restfpr_31
)
155 FUNC_END
(_restfpr_30
)
156 FUNC_END
(_restfpr_29
)
157 FUNC_END
(_restfpr_28
)
158 FUNC_END
(_restfpr_27
)
159 FUNC_END
(_restfpr_26
)
160 FUNC_END
(_restfpr_25
)
161 FUNC_END
(_restfpr_24
)
162 FUNC_END
(_restfpr_23
)
163 FUNC_END
(_restfpr_22
)
164 FUNC_END
(_restfpr_21
)
165 FUNC_END
(_restfpr_20
)
166 FUNC_END
(_restfpr_19
)
167 FUNC_END
(_restfpr_18
)
168 FUNC_END
(_restfpr_17
)
169 FUNC_END
(_restfpr_16
)
170 FUNC_END
(_restfpr_15
)
171 FUNC_END
(_restfpr_14
)
173 /* Routines for restoring integer registers
, called by the compiler.
*/
174 /* Called with r11 pointing to the stack header
word of the caller of the
*/
175 /* function
, just beyond the
end of the integer restore area.
*/
177 FUNC_START
(_restgpr_14
) lwz
14,-72(11) /* restore gp registers
*/
178 FUNC_START
(_restgpr_15
) lwz
15,-68(11)
179 FUNC_START
(_restgpr_16
) lwz
16,-64(11)
180 FUNC_START
(_restgpr_17
) lwz
17,-60(11)
181 FUNC_START
(_restgpr_18
) lwz
18,-56(11)
182 FUNC_START
(_restgpr_19
) lwz
19,-52(11)
183 FUNC_START
(_restgpr_20
) lwz
20,-48(11)
184 FUNC_START
(_restgpr_21
) lwz
21,-44(11)
185 FUNC_START
(_restgpr_22
) lwz
22,-40(11)
186 FUNC_START
(_restgpr_23
) lwz
23,-36(11)
187 FUNC_START
(_restgpr_24
) lwz
24,-32(11)
188 FUNC_START
(_restgpr_25
) lwz
25,-28(11)
189 FUNC_START
(_restgpr_26
) lwz
26,-24(11)
190 FUNC_START
(_restgpr_27
) lwz
27,-20(11)
191 FUNC_START
(_restgpr_28
) lwz
28,-16(11)
192 FUNC_START
(_restgpr_29
) lwz
29,-12(11)
193 FUNC_START
(_restgpr_30
) lwz
30,-8(11)
194 FUNC_START
(_restgpr_31
) lwz
31,-4(11)
196 FUNC_END
(_restgpr_31
)
197 FUNC_END
(_restgpr_30
)
198 FUNC_END
(_restgpr_29
)
199 FUNC_END
(_restgpr_28
)
200 FUNC_END
(_restgpr_27
)
201 FUNC_END
(_restgpr_26
)
202 FUNC_END
(_restgpr_25
)
203 FUNC_END
(_restgpr_24
)
204 FUNC_END
(_restgpr_23
)
205 FUNC_END
(_restgpr_22
)
206 FUNC_END
(_restgpr_21
)
207 FUNC_END
(_restgpr_20
)
208 FUNC_END
(_restgpr_19
)
209 FUNC_END
(_restgpr_18
)
210 FUNC_END
(_restgpr_17
)
211 FUNC_END
(_restgpr_16
)
212 FUNC_END
(_restgpr_15
)
213 FUNC_END
(_restgpr_14
)
215 /* Routines for restoring floating point registers
, called by the compiler.
*/
216 /* Called with r11 pointing to the stack header
word of the caller of the
*/
217 /* function
, just beyond the
end of the floating point save area.
*/
218 /* In addition to restoring the fp registers
, it will return to the caller
's */
221 FUNC_START(_restfpr_14_x) lfd 14,-144(11) /* restore fp registers */
222 FUNC_START(_restfpr_15_x) lfd 15,-136(11)
223 FUNC_START(_restfpr_16_x) lfd 16,-128(11)
224 FUNC_START(_restfpr_17_x) lfd 17,-120(11)
225 FUNC_START(_restfpr_18_x) lfd 18,-112(11)
226 FUNC_START(_restfpr_19_x) lfd 19,-104(11)
227 FUNC_START(_restfpr_20_x) lfd 20,-96(11)
228 FUNC_START(_restfpr_21_x) lfd 21,-88(11)
229 FUNC_START(_restfpr_22_x) lfd 22,-80(11)
230 FUNC_START(_restfpr_23_x) lfd 23,-72(11)
231 FUNC_START(_restfpr_24_x) lfd 24,-64(11)
232 FUNC_START(_restfpr_25_x) lfd 25,-56(11)
233 FUNC_START(_restfpr_26_x) lfd 26,-48(11)
234 FUNC_START(_restfpr_27_x) lfd 27,-40(11)
235 FUNC_START(_restfpr_28_x) lfd 28,-32(11)
236 FUNC_START(_restfpr_29_x) lfd 29,-24(11)
237 FUNC_START(_restfpr_30_x) lfd 30,-16(11)
238 FUNC_START(_restfpr_31_x) lwz 0,4(11)
243 FUNC_END(_restfpr_31_x)
244 FUNC_END(_restfpr_30_x)
245 FUNC_END(_restfpr_29_x)
246 FUNC_END(_restfpr_28_x)
247 FUNC_END(_restfpr_27_x)
248 FUNC_END(_restfpr_26_x)
249 FUNC_END(_restfpr_25_x)
250 FUNC_END(_restfpr_24_x)
251 FUNC_END(_restfpr_23_x)
252 FUNC_END(_restfpr_22_x)
253 FUNC_END(_restfpr_21_x)
254 FUNC_END(_restfpr_20_x)
255 FUNC_END(_restfpr_19_x)
256 FUNC_END(_restfpr_18_x)
257 FUNC_END(_restfpr_17_x)
258 FUNC_END(_restfpr_16_x)
259 FUNC_END(_restfpr_15_x)
260 FUNC_END(_restfpr_14_x)
262 /* Routines for restoring integer registers, called by the compiler. */
263 /* Called with r11 pointing to the stack header word of the caller of the */
264 /* function, just beyond the end of the integer restore area. */
266 FUNC_START(_restgpr_14_x) lwz 14,-72(11) /* restore gp registers */
267 FUNC_START(_restgpr_15_x) lwz 15,-68(11)
268 FUNC_START(_restgpr_16_x) lwz 16,-64(11)
269 FUNC_START(_restgpr_17_x) lwz 17,-60(11)
270 FUNC_START(_restgpr_18_x) lwz 18,-56(11)
271 FUNC_START(_restgpr_19_x) lwz 19,-52(11)
272 FUNC_START(_restgpr_20_x) lwz 20,-48(11)
273 FUNC_START(_restgpr_21_x) lwz 21,-44(11)
274 FUNC_START(_restgpr_22_x) lwz 22,-40(11)
275 FUNC_START(_restgpr_23_x) lwz 23,-36(11)
276 FUNC_START(_restgpr_24_x) lwz 24,-32(11)
277 FUNC_START(_restgpr_25_x) lwz 25,-28(11)
278 FUNC_START(_restgpr_26_x) lwz 26,-24(11)
279 FUNC_START(_restgpr_27_x) lwz 27,-20(11)
280 FUNC_START(_restgpr_28_x) lwz 28,-16(11)
281 FUNC_START(_restgpr_29_x) lwz 29,-12(11)
282 FUNC_START(_restgpr_30_x) lwz 30,-8(11)
283 FUNC_START(_restgpr_31_x) lwz 0,4(11)
288 FUNC_END(_restgpr_31_x)
289 FUNC_END(_restgpr_30_x)
290 FUNC_END(_restgpr_29_x)
291 FUNC_END(_restgpr_28_x)
292 FUNC_END(_restgpr_27_x)
293 FUNC_END(_restgpr_26_x)
294 FUNC_END(_restgpr_25_x)
295 FUNC_END(_restgpr_24_x)
296 FUNC_END(_restgpr_23_x)
297 FUNC_END(_restgpr_22_x)
298 FUNC_END(_restgpr_21_x)
299 FUNC_END(_restgpr_20_x)
300 FUNC_END(_restgpr_19_x)
301 FUNC_END(_restgpr_18_x)
302 FUNC_END(_restgpr_17_x)
303 FUNC_END(_restgpr_16_x)
304 FUNC_END(_restgpr_15_x)
305 FUNC_END(_restgpr_14_x)