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