Linux Audio

Check our new training course

Loading...
v6.8
  1/*
  2 * Special support for eabi and SVR4
  3 *
  4 *   Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
  5 *   Copyright 2008 Freescale Semiconductor, Inc.
  6 *   Written By Michael Meissner
  7 *
  8 * Based on gcc/config/rs6000/crtsavres.asm from gcc
  9 *
 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
 13 * later version.
 14 *
 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.)
 22 *
 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.
 27 *
 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.
 32 *
 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.
 38 */
 39
 40#ifdef __powerpc64__
 41#error "On PPC64, FPR save/restore functions are provided by the linker."
 42#endif
 43
 44	.file	"crtsavres.S"
 45	.section ".text"
 46
 
 
 
 47#define _GLOBAL(name) \
 48	.type name,@function; \
 49	.globl name; \
 50name:
 51
 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.  */
 55
 56_GLOBAL(_savegpr_14)
 57_GLOBAL(_save32gpr_14)
 58	stw	14,-72(11)	/* save gp registers */
 59_GLOBAL(_savegpr_15)
 60_GLOBAL(_save32gpr_15)
 61	stw	15,-68(11)
 62_GLOBAL(_savegpr_16)
 63_GLOBAL(_save32gpr_16)
 64	stw	16,-64(11)
 65_GLOBAL(_savegpr_17)
 66_GLOBAL(_save32gpr_17)
 67	stw	17,-60(11)
 68_GLOBAL(_savegpr_18)
 69_GLOBAL(_save32gpr_18)
 70	stw	18,-56(11)
 71_GLOBAL(_savegpr_19)
 72_GLOBAL(_save32gpr_19)
 73	stw	19,-52(11)
 74_GLOBAL(_savegpr_20)
 75_GLOBAL(_save32gpr_20)
 76	stw	20,-48(11)
 77_GLOBAL(_savegpr_21)
 78_GLOBAL(_save32gpr_21)
 79	stw	21,-44(11)
 80_GLOBAL(_savegpr_22)
 81_GLOBAL(_save32gpr_22)
 82	stw	22,-40(11)
 83_GLOBAL(_savegpr_23)
 84_GLOBAL(_save32gpr_23)
 85	stw	23,-36(11)
 86_GLOBAL(_savegpr_24)
 87_GLOBAL(_save32gpr_24)
 88	stw	24,-32(11)
 89_GLOBAL(_savegpr_25)
 90_GLOBAL(_save32gpr_25)
 91	stw	25,-28(11)
 92_GLOBAL(_savegpr_26)
 93_GLOBAL(_save32gpr_26)
 94	stw	26,-24(11)
 95_GLOBAL(_savegpr_27)
 96_GLOBAL(_save32gpr_27)
 97	stw	27,-20(11)
 98_GLOBAL(_savegpr_28)
 99_GLOBAL(_save32gpr_28)
100	stw	28,-16(11)
101_GLOBAL(_savegpr_29)
102_GLOBAL(_save32gpr_29)
103	stw	29,-12(11)
104_GLOBAL(_savegpr_30)
105_GLOBAL(_save32gpr_30)
106	stw	30,-8(11)
107_GLOBAL(_savegpr_31)
108_GLOBAL(_save32gpr_31)
109	stw	31,-4(11)
110	blr
111
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.  */
115
116_GLOBAL(_restgpr_14)
117_GLOBAL(_rest32gpr_14)
118	lwz	14,-72(11)	/* restore gp registers */
119_GLOBAL(_restgpr_15)
120_GLOBAL(_rest32gpr_15)
121	lwz	15,-68(11)
122_GLOBAL(_restgpr_16)
123_GLOBAL(_rest32gpr_16)
124	lwz	16,-64(11)
125_GLOBAL(_restgpr_17)
126_GLOBAL(_rest32gpr_17)
127	lwz	17,-60(11)
128_GLOBAL(_restgpr_18)
129_GLOBAL(_rest32gpr_18)
130	lwz	18,-56(11)
131_GLOBAL(_restgpr_19)
132_GLOBAL(_rest32gpr_19)
133	lwz	19,-52(11)
134_GLOBAL(_restgpr_20)
135_GLOBAL(_rest32gpr_20)
136	lwz	20,-48(11)
137_GLOBAL(_restgpr_21)
138_GLOBAL(_rest32gpr_21)
139	lwz	21,-44(11)
140_GLOBAL(_restgpr_22)
141_GLOBAL(_rest32gpr_22)
142	lwz	22,-40(11)
143_GLOBAL(_restgpr_23)
144_GLOBAL(_rest32gpr_23)
145	lwz	23,-36(11)
146_GLOBAL(_restgpr_24)
147_GLOBAL(_rest32gpr_24)
148	lwz	24,-32(11)
149_GLOBAL(_restgpr_25)
150_GLOBAL(_rest32gpr_25)
151	lwz	25,-28(11)
152_GLOBAL(_restgpr_26)
153_GLOBAL(_rest32gpr_26)
154	lwz	26,-24(11)
155_GLOBAL(_restgpr_27)
156_GLOBAL(_rest32gpr_27)
157	lwz	27,-20(11)
158_GLOBAL(_restgpr_28)
159_GLOBAL(_rest32gpr_28)
160	lwz	28,-16(11)
161_GLOBAL(_restgpr_29)
162_GLOBAL(_rest32gpr_29)
163	lwz	29,-12(11)
164_GLOBAL(_restgpr_30)
165_GLOBAL(_rest32gpr_30)
166	lwz	30,-8(11)
167_GLOBAL(_restgpr_31)
168_GLOBAL(_rest32gpr_31)
169	lwz	31,-4(11)
170	blr
171
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.  */
175
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)
181	lwz	15,-68(11)
182_GLOBAL(_restgpr_16_x)
183_GLOBAL(_rest32gpr_16_x)
184	lwz	16,-64(11)
185_GLOBAL(_restgpr_17_x)
186_GLOBAL(_rest32gpr_17_x)
187	lwz	17,-60(11)
188_GLOBAL(_restgpr_18_x)
189_GLOBAL(_rest32gpr_18_x)
190	lwz	18,-56(11)
191_GLOBAL(_restgpr_19_x)
192_GLOBAL(_rest32gpr_19_x)
193	lwz	19,-52(11)
194_GLOBAL(_restgpr_20_x)
195_GLOBAL(_rest32gpr_20_x)
196	lwz	20,-48(11)
197_GLOBAL(_restgpr_21_x)
198_GLOBAL(_rest32gpr_21_x)
199	lwz	21,-44(11)
200_GLOBAL(_restgpr_22_x)
201_GLOBAL(_rest32gpr_22_x)
202	lwz	22,-40(11)
203_GLOBAL(_restgpr_23_x)
204_GLOBAL(_rest32gpr_23_x)
205	lwz	23,-36(11)
206_GLOBAL(_restgpr_24_x)
207_GLOBAL(_rest32gpr_24_x)
208	lwz	24,-32(11)
209_GLOBAL(_restgpr_25_x)
210_GLOBAL(_rest32gpr_25_x)
211	lwz	25,-28(11)
212_GLOBAL(_restgpr_26_x)
213_GLOBAL(_rest32gpr_26_x)
214	lwz	26,-24(11)
215_GLOBAL(_restgpr_27_x)
216_GLOBAL(_rest32gpr_27_x)
217	lwz	27,-20(11)
218_GLOBAL(_restgpr_28_x)
219_GLOBAL(_rest32gpr_28_x)
220	lwz	28,-16(11)
221_GLOBAL(_restgpr_29_x)
222_GLOBAL(_rest32gpr_29_x)
223	lwz	29,-12(11)
224_GLOBAL(_restgpr_30_x)
225_GLOBAL(_rest32gpr_30_x)
226	lwz	30,-8(11)
227_GLOBAL(_restgpr_31_x)
228_GLOBAL(_rest32gpr_31_x)
229	lwz	0,4(11)
230	lwz	31,-4(11)
231	mtlr	0
232	mr	1,11
233	blr
v3.15
  1/*
  2 * Special support for eabi and SVR4
  3 *
  4 *   Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
  5 *   Copyright 2008 Freescale Semiconductor, Inc.
  6 *   Written By Michael Meissner
  7 *
  8 * Based on gcc/config/rs6000/crtsavres.asm from gcc
  9 *
 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
 13 * later version.
 14 *
 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.)
 22 *
 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.
 27 *
 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.
 32 *
 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.
 38 */
 39
 
 
 
 
 40	.file	"crtsavres.S"
 41	.section ".text"
 42
 43/* On PowerPC64 Linux, these functions are provided by the linker.  */
 44#ifndef __powerpc64__
 45
 46#define _GLOBAL(name) \
 47	.type name,@function; \
 48	.globl name; \
 49name:
 50
 51/* Routines for saving integer registers, called by the compiler.  */
 52/* Called with r11 pointing to the stack header word of the caller of the */
 53/* function, just beyond the end of the integer save area.  */
 54
 55_GLOBAL(_savegpr_14)
 56_GLOBAL(_save32gpr_14)
 57	stw	14,-72(11)	/* save gp registers */
 58_GLOBAL(_savegpr_15)
 59_GLOBAL(_save32gpr_15)
 60	stw	15,-68(11)
 61_GLOBAL(_savegpr_16)
 62_GLOBAL(_save32gpr_16)
 63	stw	16,-64(11)
 64_GLOBAL(_savegpr_17)
 65_GLOBAL(_save32gpr_17)
 66	stw	17,-60(11)
 67_GLOBAL(_savegpr_18)
 68_GLOBAL(_save32gpr_18)
 69	stw	18,-56(11)
 70_GLOBAL(_savegpr_19)
 71_GLOBAL(_save32gpr_19)
 72	stw	19,-52(11)
 73_GLOBAL(_savegpr_20)
 74_GLOBAL(_save32gpr_20)
 75	stw	20,-48(11)
 76_GLOBAL(_savegpr_21)
 77_GLOBAL(_save32gpr_21)
 78	stw	21,-44(11)
 79_GLOBAL(_savegpr_22)
 80_GLOBAL(_save32gpr_22)
 81	stw	22,-40(11)
 82_GLOBAL(_savegpr_23)
 83_GLOBAL(_save32gpr_23)
 84	stw	23,-36(11)
 85_GLOBAL(_savegpr_24)
 86_GLOBAL(_save32gpr_24)
 87	stw	24,-32(11)
 88_GLOBAL(_savegpr_25)
 89_GLOBAL(_save32gpr_25)
 90	stw	25,-28(11)
 91_GLOBAL(_savegpr_26)
 92_GLOBAL(_save32gpr_26)
 93	stw	26,-24(11)
 94_GLOBAL(_savegpr_27)
 95_GLOBAL(_save32gpr_27)
 96	stw	27,-20(11)
 97_GLOBAL(_savegpr_28)
 98_GLOBAL(_save32gpr_28)
 99	stw	28,-16(11)
100_GLOBAL(_savegpr_29)
101_GLOBAL(_save32gpr_29)
102	stw	29,-12(11)
103_GLOBAL(_savegpr_30)
104_GLOBAL(_save32gpr_30)
105	stw	30,-8(11)
106_GLOBAL(_savegpr_31)
107_GLOBAL(_save32gpr_31)
108	stw	31,-4(11)
109	blr
110
111/* Routines for restoring integer registers, called by the compiler.  */
112/* Called with r11 pointing to the stack header word of the caller of the */
113/* function, just beyond the end of the integer restore area.  */
114
115_GLOBAL(_restgpr_14)
116_GLOBAL(_rest32gpr_14)
117	lwz	14,-72(11)	/* restore gp registers */
118_GLOBAL(_restgpr_15)
119_GLOBAL(_rest32gpr_15)
120	lwz	15,-68(11)
121_GLOBAL(_restgpr_16)
122_GLOBAL(_rest32gpr_16)
123	lwz	16,-64(11)
124_GLOBAL(_restgpr_17)
125_GLOBAL(_rest32gpr_17)
126	lwz	17,-60(11)
127_GLOBAL(_restgpr_18)
128_GLOBAL(_rest32gpr_18)
129	lwz	18,-56(11)
130_GLOBAL(_restgpr_19)
131_GLOBAL(_rest32gpr_19)
132	lwz	19,-52(11)
133_GLOBAL(_restgpr_20)
134_GLOBAL(_rest32gpr_20)
135	lwz	20,-48(11)
136_GLOBAL(_restgpr_21)
137_GLOBAL(_rest32gpr_21)
138	lwz	21,-44(11)
139_GLOBAL(_restgpr_22)
140_GLOBAL(_rest32gpr_22)
141	lwz	22,-40(11)
142_GLOBAL(_restgpr_23)
143_GLOBAL(_rest32gpr_23)
144	lwz	23,-36(11)
145_GLOBAL(_restgpr_24)
146_GLOBAL(_rest32gpr_24)
147	lwz	24,-32(11)
148_GLOBAL(_restgpr_25)
149_GLOBAL(_rest32gpr_25)
150	lwz	25,-28(11)
151_GLOBAL(_restgpr_26)
152_GLOBAL(_rest32gpr_26)
153	lwz	26,-24(11)
154_GLOBAL(_restgpr_27)
155_GLOBAL(_rest32gpr_27)
156	lwz	27,-20(11)
157_GLOBAL(_restgpr_28)
158_GLOBAL(_rest32gpr_28)
159	lwz	28,-16(11)
160_GLOBAL(_restgpr_29)
161_GLOBAL(_rest32gpr_29)
162	lwz	29,-12(11)
163_GLOBAL(_restgpr_30)
164_GLOBAL(_rest32gpr_30)
165	lwz	30,-8(11)
166_GLOBAL(_restgpr_31)
167_GLOBAL(_rest32gpr_31)
168	lwz	31,-4(11)
169	blr
170
171/* Routines for restoring integer registers, called by the compiler.  */
172/* Called with r11 pointing to the stack header word of the caller of the */
173/* function, just beyond the end of the integer restore area.  */
174
175_GLOBAL(_restgpr_14_x)
176_GLOBAL(_rest32gpr_14_x)
177	lwz	14,-72(11)	/* restore gp registers */
178_GLOBAL(_restgpr_15_x)
179_GLOBAL(_rest32gpr_15_x)
180	lwz	15,-68(11)
181_GLOBAL(_restgpr_16_x)
182_GLOBAL(_rest32gpr_16_x)
183	lwz	16,-64(11)
184_GLOBAL(_restgpr_17_x)
185_GLOBAL(_rest32gpr_17_x)
186	lwz	17,-60(11)
187_GLOBAL(_restgpr_18_x)
188_GLOBAL(_rest32gpr_18_x)
189	lwz	18,-56(11)
190_GLOBAL(_restgpr_19_x)
191_GLOBAL(_rest32gpr_19_x)
192	lwz	19,-52(11)
193_GLOBAL(_restgpr_20_x)
194_GLOBAL(_rest32gpr_20_x)
195	lwz	20,-48(11)
196_GLOBAL(_restgpr_21_x)
197_GLOBAL(_rest32gpr_21_x)
198	lwz	21,-44(11)
199_GLOBAL(_restgpr_22_x)
200_GLOBAL(_rest32gpr_22_x)
201	lwz	22,-40(11)
202_GLOBAL(_restgpr_23_x)
203_GLOBAL(_rest32gpr_23_x)
204	lwz	23,-36(11)
205_GLOBAL(_restgpr_24_x)
206_GLOBAL(_rest32gpr_24_x)
207	lwz	24,-32(11)
208_GLOBAL(_restgpr_25_x)
209_GLOBAL(_rest32gpr_25_x)
210	lwz	25,-28(11)
211_GLOBAL(_restgpr_26_x)
212_GLOBAL(_rest32gpr_26_x)
213	lwz	26,-24(11)
214_GLOBAL(_restgpr_27_x)
215_GLOBAL(_rest32gpr_27_x)
216	lwz	27,-20(11)
217_GLOBAL(_restgpr_28_x)
218_GLOBAL(_rest32gpr_28_x)
219	lwz	28,-16(11)
220_GLOBAL(_restgpr_29_x)
221_GLOBAL(_rest32gpr_29_x)
222	lwz	29,-12(11)
223_GLOBAL(_restgpr_30_x)
224_GLOBAL(_rest32gpr_30_x)
225	lwz	30,-8(11)
226_GLOBAL(_restgpr_31_x)
227_GLOBAL(_rest32gpr_31_x)
228	lwz	0,4(11)
229	lwz	31,-4(11)
230	mtlr	0
231	mr	1,11
232	blr
233#endif