Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Special support for eabi and SVR4
0003  *
0004  *   Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
0005  *   Copyright 2008 Freescale Semiconductor, Inc.
0006  *   Written By Michael Meissner
0007  *
0008  * Based on gcc/config/rs6000/crtsavres.asm from gcc
0009  *
0010  * This file is free software; you can redistribute it and/or modify it
0011  * under the terms of the GNU General Public License as published by the
0012  * Free Software Foundation; either version 2, or (at your option) any
0013  * later version.
0014  *
0015  * In addition to the permissions in the GNU General Public License, the
0016  * Free Software Foundation gives you unlimited permission to link the
0017  * compiled version of this file with other programs, and to distribute
0018  * those programs without any restriction coming from the use of this
0019  * file.  (The General Public License restrictions do apply in other
0020  * respects; for example, they cover modification of the file, and
0021  * distribution when not linked into another program.)
0022  *
0023  * This file is distributed in the hope that it will be useful, but
0024  * WITHOUT ANY WARRANTY; without even the implied warranty of
0025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0026  * General Public License for more details.
0027  *
0028  * You should have received a copy of the GNU General Public License
0029  * along with this program; see the file COPYING.  If not, write to
0030  * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
0031  * Boston, MA 02110-1301, USA.
0032  *
0033  *    As a special exception, if you link this library with files
0034  *    compiled with GCC to produce an executable, this does not cause
0035  *    the resulting executable to be covered by the GNU General Public License.
0036  *    This exception does not however invalidate any other reasons why
0037  *    the executable file might be covered by the GNU General Public License.
0038  */
0039 
0040 #ifdef __powerpc64__
0041 #error "On PPC64, FPR save/restore functions are provided by the linker."
0042 #endif
0043 
0044     .file   "crtsavres.S"
0045     .section ".text"
0046 
0047 #define _GLOBAL(name) \
0048     .type name,@function; \
0049     .globl name; \
0050 name:
0051 
0052 /* Routines for saving integer registers, called by the compiler.  */
0053 /* Called with r11 pointing to the stack header word of the caller of the */
0054 /* function, just beyond the end of the integer save area.  */
0055 
0056 _GLOBAL(_savegpr_14)
0057 _GLOBAL(_save32gpr_14)
0058     stw 14,-72(11)  /* save gp registers */
0059 _GLOBAL(_savegpr_15)
0060 _GLOBAL(_save32gpr_15)
0061     stw 15,-68(11)
0062 _GLOBAL(_savegpr_16)
0063 _GLOBAL(_save32gpr_16)
0064     stw 16,-64(11)
0065 _GLOBAL(_savegpr_17)
0066 _GLOBAL(_save32gpr_17)
0067     stw 17,-60(11)
0068 _GLOBAL(_savegpr_18)
0069 _GLOBAL(_save32gpr_18)
0070     stw 18,-56(11)
0071 _GLOBAL(_savegpr_19)
0072 _GLOBAL(_save32gpr_19)
0073     stw 19,-52(11)
0074 _GLOBAL(_savegpr_20)
0075 _GLOBAL(_save32gpr_20)
0076     stw 20,-48(11)
0077 _GLOBAL(_savegpr_21)
0078 _GLOBAL(_save32gpr_21)
0079     stw 21,-44(11)
0080 _GLOBAL(_savegpr_22)
0081 _GLOBAL(_save32gpr_22)
0082     stw 22,-40(11)
0083 _GLOBAL(_savegpr_23)
0084 _GLOBAL(_save32gpr_23)
0085     stw 23,-36(11)
0086 _GLOBAL(_savegpr_24)
0087 _GLOBAL(_save32gpr_24)
0088     stw 24,-32(11)
0089 _GLOBAL(_savegpr_25)
0090 _GLOBAL(_save32gpr_25)
0091     stw 25,-28(11)
0092 _GLOBAL(_savegpr_26)
0093 _GLOBAL(_save32gpr_26)
0094     stw 26,-24(11)
0095 _GLOBAL(_savegpr_27)
0096 _GLOBAL(_save32gpr_27)
0097     stw 27,-20(11)
0098 _GLOBAL(_savegpr_28)
0099 _GLOBAL(_save32gpr_28)
0100     stw 28,-16(11)
0101 _GLOBAL(_savegpr_29)
0102 _GLOBAL(_save32gpr_29)
0103     stw 29,-12(11)
0104 _GLOBAL(_savegpr_30)
0105 _GLOBAL(_save32gpr_30)
0106     stw 30,-8(11)
0107 _GLOBAL(_savegpr_31)
0108 _GLOBAL(_save32gpr_31)
0109     stw 31,-4(11)
0110     blr
0111 
0112 /* Routines for restoring integer registers, called by the compiler.  */
0113 /* Called with r11 pointing to the stack header word of the caller of the */
0114 /* function, just beyond the end of the integer restore area.  */
0115 
0116 _GLOBAL(_restgpr_14)
0117 _GLOBAL(_rest32gpr_14)
0118     lwz 14,-72(11)  /* restore gp registers */
0119 _GLOBAL(_restgpr_15)
0120 _GLOBAL(_rest32gpr_15)
0121     lwz 15,-68(11)
0122 _GLOBAL(_restgpr_16)
0123 _GLOBAL(_rest32gpr_16)
0124     lwz 16,-64(11)
0125 _GLOBAL(_restgpr_17)
0126 _GLOBAL(_rest32gpr_17)
0127     lwz 17,-60(11)
0128 _GLOBAL(_restgpr_18)
0129 _GLOBAL(_rest32gpr_18)
0130     lwz 18,-56(11)
0131 _GLOBAL(_restgpr_19)
0132 _GLOBAL(_rest32gpr_19)
0133     lwz 19,-52(11)
0134 _GLOBAL(_restgpr_20)
0135 _GLOBAL(_rest32gpr_20)
0136     lwz 20,-48(11)
0137 _GLOBAL(_restgpr_21)
0138 _GLOBAL(_rest32gpr_21)
0139     lwz 21,-44(11)
0140 _GLOBAL(_restgpr_22)
0141 _GLOBAL(_rest32gpr_22)
0142     lwz 22,-40(11)
0143 _GLOBAL(_restgpr_23)
0144 _GLOBAL(_rest32gpr_23)
0145     lwz 23,-36(11)
0146 _GLOBAL(_restgpr_24)
0147 _GLOBAL(_rest32gpr_24)
0148     lwz 24,-32(11)
0149 _GLOBAL(_restgpr_25)
0150 _GLOBAL(_rest32gpr_25)
0151     lwz 25,-28(11)
0152 _GLOBAL(_restgpr_26)
0153 _GLOBAL(_rest32gpr_26)
0154     lwz 26,-24(11)
0155 _GLOBAL(_restgpr_27)
0156 _GLOBAL(_rest32gpr_27)
0157     lwz 27,-20(11)
0158 _GLOBAL(_restgpr_28)
0159 _GLOBAL(_rest32gpr_28)
0160     lwz 28,-16(11)
0161 _GLOBAL(_restgpr_29)
0162 _GLOBAL(_rest32gpr_29)
0163     lwz 29,-12(11)
0164 _GLOBAL(_restgpr_30)
0165 _GLOBAL(_rest32gpr_30)
0166     lwz 30,-8(11)
0167 _GLOBAL(_restgpr_31)
0168 _GLOBAL(_rest32gpr_31)
0169     lwz 31,-4(11)
0170     blr
0171 
0172 /* Routines for restoring integer registers, called by the compiler.  */
0173 /* Called with r11 pointing to the stack header word of the caller of the */
0174 /* function, just beyond the end of the integer restore area.  */
0175 
0176 _GLOBAL(_restgpr_14_x)
0177 _GLOBAL(_rest32gpr_14_x)
0178     lwz 14,-72(11)  /* restore gp registers */
0179 _GLOBAL(_restgpr_15_x)
0180 _GLOBAL(_rest32gpr_15_x)
0181     lwz 15,-68(11)
0182 _GLOBAL(_restgpr_16_x)
0183 _GLOBAL(_rest32gpr_16_x)
0184     lwz 16,-64(11)
0185 _GLOBAL(_restgpr_17_x)
0186 _GLOBAL(_rest32gpr_17_x)
0187     lwz 17,-60(11)
0188 _GLOBAL(_restgpr_18_x)
0189 _GLOBAL(_rest32gpr_18_x)
0190     lwz 18,-56(11)
0191 _GLOBAL(_restgpr_19_x)
0192 _GLOBAL(_rest32gpr_19_x)
0193     lwz 19,-52(11)
0194 _GLOBAL(_restgpr_20_x)
0195 _GLOBAL(_rest32gpr_20_x)
0196     lwz 20,-48(11)
0197 _GLOBAL(_restgpr_21_x)
0198 _GLOBAL(_rest32gpr_21_x)
0199     lwz 21,-44(11)
0200 _GLOBAL(_restgpr_22_x)
0201 _GLOBAL(_rest32gpr_22_x)
0202     lwz 22,-40(11)
0203 _GLOBAL(_restgpr_23_x)
0204 _GLOBAL(_rest32gpr_23_x)
0205     lwz 23,-36(11)
0206 _GLOBAL(_restgpr_24_x)
0207 _GLOBAL(_rest32gpr_24_x)
0208     lwz 24,-32(11)
0209 _GLOBAL(_restgpr_25_x)
0210 _GLOBAL(_rest32gpr_25_x)
0211     lwz 25,-28(11)
0212 _GLOBAL(_restgpr_26_x)
0213 _GLOBAL(_rest32gpr_26_x)
0214     lwz 26,-24(11)
0215 _GLOBAL(_restgpr_27_x)
0216 _GLOBAL(_rest32gpr_27_x)
0217     lwz 27,-20(11)
0218 _GLOBAL(_restgpr_28_x)
0219 _GLOBAL(_rest32gpr_28_x)
0220     lwz 28,-16(11)
0221 _GLOBAL(_restgpr_29_x)
0222 _GLOBAL(_rest32gpr_29_x)
0223     lwz 29,-12(11)
0224 _GLOBAL(_restgpr_30_x)
0225 _GLOBAL(_rest32gpr_30_x)
0226     lwz 30,-8(11)
0227 _GLOBAL(_restgpr_31_x)
0228 _GLOBAL(_rest32gpr_31_x)
0229     lwz 0,4(11)
0230     lwz 31,-4(11)
0231     mtlr    0
0232     mr  1,11
0233     blr