1 /* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
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.
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.
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
20 General Purpose Register (GPR) restore routine
21 when Floating Point Registers (FPRs) are not saved
23 Note: This restore routine must not be called when GPR30 or
24 GPR31, or both, are the only registers beings saved. In these
25 cases, the saving and restoring must be done inline.
31 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_13)
32 C_TEXT(_restgpr0_13): lwz r13,-76(r1)
33 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_14)
34 C_TEXT(_restgpr0_14): lwz r14,-72(r1)
35 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_15)
36 C_TEXT(_restgpr0_15): lwz r15,-68(r1)
37 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_16)
38 C_TEXT(_restgpr0_16): lwz r16,-64(r1)
39 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_17)
40 C_TEXT(_restgpr0_17): lwz r17,-60(r1)
41 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_18)
42 C_TEXT(_restgpr0_18): lwz r18,-56(r1)
43 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_19)
44 C_TEXT(_restgpr0_19): lwz r19,-52(r1)
45 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_20)
46 C_TEXT(_restgpr0_20): lwz r20,-48(r1)
47 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_21)
48 C_TEXT(_restgpr0_21): lwz r21,-44(r1)
49 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_22)
50 C_TEXT(_restgpr0_22): lwz r22,-40(r1)
51 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_23)
52 C_TEXT(_restgpr0_23): lwz r23,-36(r1)
53 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_24)
54 C_TEXT(_restgpr0_24): lwz r24,-32(r1)
55 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_25)
56 C_TEXT(_restgpr0_25): lwz r25,-28(r1)
57 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_26)
58 C_TEXT(_restgpr0_26): lwz r26,-24(r1)
59 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_27)
60 C_TEXT(_restgpr0_27): lwz r27,-20(r1)
61 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_28)
62 C_TEXT(_restgpr0_28): lwz r28,-16(r1)
63 ASM_GLOBAL_DIRECTIVE C_TEXT(_restgpr0_29)
64 C_TEXT(_restgpr0_29): lwz r0,8(r1) #get return address from frame
65 lwz r29,-12(r1) #restore r29
66 mtlr r0 #move return address to LR
67 lwz r30,-8(r1) #restore r30
68 lwz r31,-4(r1) #restore r31