PPC32 ABI helper functions to save register content.
[kopensolaris-gnu/glibc.git] / sysdeps / powerpc / powerpc32 / gprsave1.S
1 /* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
3
4    The GNU C Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 2.1 of the License, or (at your option) any later version.
8
9    The GNU C Library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Lesser General Public License for more details.
13
14    You should have received a copy of the GNU Lesser General Public
15    License along with the GNU C Library; if not, write to the Free
16    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17    02111-1307 USA.  */
18
19 /*
20     General Purpose Register (GPR) save routine
21     when Floating Point Registers (FPRs) are saved
22 */
23
24 #include <sysdep.h>
25
26 ENTRY(_savegpr1_all)
27                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_13)
28 C_TEXT(_savegpr1_13):   stw     r13,-76(r12)
29                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_14)
30 C_TEXT(_savegpr1_14):   stw     r14,-72(r12)
31                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_15)
32 C_TEXT(_savegpr1_15):   stw     r15,-68(r12)
33                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_16)
34 C_TEXT(_savegpr1_16):   stw     r16,-64(r12)
35                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_17)
36 C_TEXT(_savegpr1_17):   stw     r17,-60(r12)
37                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_18)
38 C_TEXT(_savegpr1_18):   stw     r18,-56(r12)
39                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_19)
40 C_TEXT(_savegpr1_19):   stw     r19,-52(r12)
41                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_20)
42 C_TEXT(_savegpr1_20):   stw     r20,-48(r12)
43                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_21)
44 C_TEXT(_savegpr1_21):   stw     r21,-44(r12)
45                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_22)
46 C_TEXT(_savegpr1_22):   stw     r22,-40(r12)
47                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_23)
48 C_TEXT(_savegpr1_23):   stw     r23,-36(r12)
49                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_24)
50 C_TEXT(_savegpr1_24):   stw     r24,-32(r12)
51                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_25)
52 C_TEXT(_savegpr1_25):   stw     r25,-28(r12)
53                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_26)
54 C_TEXT(_savegpr1_26):   stw     r26,-24(r12)
55                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_27)
56 C_TEXT(_savegpr1_27):   stw     r27,-20(r12)
57                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_28)
58 C_TEXT(_savegpr1_28):   stw     r28,-16(r12)
59                 ASM_GLOBAL_DIRECTIVE C_TEXT(_savegpr1_29)
60 C_TEXT(_savegpr1_29):   stw     r29,-12(r12)    #save r29
61                         stw     r30,-8(r12)     #save r30
62                         stw     r31,-4(r12)     #save r31
63                         blr                     #return