/*1* Special support for eabi and SVR42*3* Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.4* Copyright 2008 Freescale Semiconductor, Inc.5* Written By Michael Meissner6*7* Based on gcc/config/rs6000/crtsavres.asm from gcc8*9* This file is free software; you can redistribute it and/or modify it10* under the terms of the GNU General Public License as published by the11* Free Software Foundation; either version 2, or (at your option) any12* later version.13*14* In addition to the permissions in the GNU General Public License, the15* Free Software Foundation gives you unlimited permission to link the16* compiled version of this file with other programs, and to distribute17* those programs without any restriction coming from the use of this18* file. (The General Public License restrictions do apply in other19* respects; for example, they cover modification of the file, and20* distribution when not linked into another program.)21*22* This file is distributed in the hope that it will be useful, but23* WITHOUT ANY WARRANTY; without even the implied warranty of24* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU25* General Public License for more details.26*27* You should have received a copy of the GNU General Public License28* along with this program; see the file COPYING. If not, write to29* the Free Software Foundation, 51 Franklin Street, Fifth Floor,30* Boston, MA 02110-1301, USA.31*32* As a special exception, if you link this library with files33* compiled with GCC to produce an executable, this does not cause34* the resulting executable to be covered by the GNU General Public License.35* This exception does not however invalidate any other reasons why36* the executable file might be covered by the GNU General Public License.37*/3839.file "crtsavres.S"40.section ".text"4142/* On PowerPC64 Linux, these functions are provided by the linker. */43#ifndef __powerpc64__4445#define _GLOBAL(name) \46.type name,@function; \47.globl name; \48name:4950/* 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. */5354_GLOBAL(_savegpr_14)55_GLOBAL(_save32gpr_14)56stw 14,-72(11) /* save gp registers */57_GLOBAL(_savegpr_15)58_GLOBAL(_save32gpr_15)59stw 15,-68(11)60_GLOBAL(_savegpr_16)61_GLOBAL(_save32gpr_16)62stw 16,-64(11)63_GLOBAL(_savegpr_17)64_GLOBAL(_save32gpr_17)65stw 17,-60(11)66_GLOBAL(_savegpr_18)67_GLOBAL(_save32gpr_18)68stw 18,-56(11)69_GLOBAL(_savegpr_19)70_GLOBAL(_save32gpr_19)71stw 19,-52(11)72_GLOBAL(_savegpr_20)73_GLOBAL(_save32gpr_20)74stw 20,-48(11)75_GLOBAL(_savegpr_21)76_GLOBAL(_save32gpr_21)77stw 21,-44(11)78_GLOBAL(_savegpr_22)79_GLOBAL(_save32gpr_22)80stw 22,-40(11)81_GLOBAL(_savegpr_23)82_GLOBAL(_save32gpr_23)83stw 23,-36(11)84_GLOBAL(_savegpr_24)85_GLOBAL(_save32gpr_24)86stw 24,-32(11)87_GLOBAL(_savegpr_25)88_GLOBAL(_save32gpr_25)89stw 25,-28(11)90_GLOBAL(_savegpr_26)91_GLOBAL(_save32gpr_26)92stw 26,-24(11)93_GLOBAL(_savegpr_27)94_GLOBAL(_save32gpr_27)95stw 27,-20(11)96_GLOBAL(_savegpr_28)97_GLOBAL(_save32gpr_28)98stw 28,-16(11)99_GLOBAL(_savegpr_29)100_GLOBAL(_save32gpr_29)101stw 29,-12(11)102_GLOBAL(_savegpr_30)103_GLOBAL(_save32gpr_30)104stw 30,-8(11)105_GLOBAL(_savegpr_31)106_GLOBAL(_save32gpr_31)107stw 31,-4(11)108blr109110/* 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. */113114_GLOBAL(_restgpr_14)115_GLOBAL(_rest32gpr_14)116lwz 14,-72(11) /* restore gp registers */117_GLOBAL(_restgpr_15)118_GLOBAL(_rest32gpr_15)119lwz 15,-68(11)120_GLOBAL(_restgpr_16)121_GLOBAL(_rest32gpr_16)122lwz 16,-64(11)123_GLOBAL(_restgpr_17)124_GLOBAL(_rest32gpr_17)125lwz 17,-60(11)126_GLOBAL(_restgpr_18)127_GLOBAL(_rest32gpr_18)128lwz 18,-56(11)129_GLOBAL(_restgpr_19)130_GLOBAL(_rest32gpr_19)131lwz 19,-52(11)132_GLOBAL(_restgpr_20)133_GLOBAL(_rest32gpr_20)134lwz 20,-48(11)135_GLOBAL(_restgpr_21)136_GLOBAL(_rest32gpr_21)137lwz 21,-44(11)138_GLOBAL(_restgpr_22)139_GLOBAL(_rest32gpr_22)140lwz 22,-40(11)141_GLOBAL(_restgpr_23)142_GLOBAL(_rest32gpr_23)143lwz 23,-36(11)144_GLOBAL(_restgpr_24)145_GLOBAL(_rest32gpr_24)146lwz 24,-32(11)147_GLOBAL(_restgpr_25)148_GLOBAL(_rest32gpr_25)149lwz 25,-28(11)150_GLOBAL(_restgpr_26)151_GLOBAL(_rest32gpr_26)152lwz 26,-24(11)153_GLOBAL(_restgpr_27)154_GLOBAL(_rest32gpr_27)155lwz 27,-20(11)156_GLOBAL(_restgpr_28)157_GLOBAL(_rest32gpr_28)158lwz 28,-16(11)159_GLOBAL(_restgpr_29)160_GLOBAL(_rest32gpr_29)161lwz 29,-12(11)162_GLOBAL(_restgpr_30)163_GLOBAL(_rest32gpr_30)164lwz 30,-8(11)165_GLOBAL(_restgpr_31)166_GLOBAL(_rest32gpr_31)167lwz 31,-4(11)168blr169170/* 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. */173174_GLOBAL(_restgpr_14_x)175_GLOBAL(_rest32gpr_14_x)176lwz 14,-72(11) /* restore gp registers */177_GLOBAL(_restgpr_15_x)178_GLOBAL(_rest32gpr_15_x)179lwz 15,-68(11)180_GLOBAL(_restgpr_16_x)181_GLOBAL(_rest32gpr_16_x)182lwz 16,-64(11)183_GLOBAL(_restgpr_17_x)184_GLOBAL(_rest32gpr_17_x)185lwz 17,-60(11)186_GLOBAL(_restgpr_18_x)187_GLOBAL(_rest32gpr_18_x)188lwz 18,-56(11)189_GLOBAL(_restgpr_19_x)190_GLOBAL(_rest32gpr_19_x)191lwz 19,-52(11)192_GLOBAL(_restgpr_20_x)193_GLOBAL(_rest32gpr_20_x)194lwz 20,-48(11)195_GLOBAL(_restgpr_21_x)196_GLOBAL(_rest32gpr_21_x)197lwz 21,-44(11)198_GLOBAL(_restgpr_22_x)199_GLOBAL(_rest32gpr_22_x)200lwz 22,-40(11)201_GLOBAL(_restgpr_23_x)202_GLOBAL(_rest32gpr_23_x)203lwz 23,-36(11)204_GLOBAL(_restgpr_24_x)205_GLOBAL(_rest32gpr_24_x)206lwz 24,-32(11)207_GLOBAL(_restgpr_25_x)208_GLOBAL(_rest32gpr_25_x)209lwz 25,-28(11)210_GLOBAL(_restgpr_26_x)211_GLOBAL(_rest32gpr_26_x)212lwz 26,-24(11)213_GLOBAL(_restgpr_27_x)214_GLOBAL(_rest32gpr_27_x)215lwz 27,-20(11)216_GLOBAL(_restgpr_28_x)217_GLOBAL(_rest32gpr_28_x)218lwz 28,-16(11)219_GLOBAL(_restgpr_29_x)220_GLOBAL(_rest32gpr_29_x)221lwz 29,-12(11)222_GLOBAL(_restgpr_30_x)223_GLOBAL(_rest32gpr_30_x)224lwz 30,-8(11)225_GLOBAL(_restgpr_31_x)226_GLOBAL(_rest32gpr_31_x)227lwz 0,4(11)228lwz 31,-4(11)229mtlr 0230mr 1,11231blr232#endif233234235