xref: /aosp_15_r20/external/compiler-rt/lib/builtins/ppc/restFP.S (revision 7c3d14c8b49c529e04be81a3ce6f5cc23712e4c6)
1*7c3d14c8STreehugger Robot//===-- restFP.S - Implement restFP ---------------------------------------===//
2*7c3d14c8STreehugger Robot//
3*7c3d14c8STreehugger Robot//                     The LLVM Compiler Infrastructure
4*7c3d14c8STreehugger Robot//
5*7c3d14c8STreehugger Robot// This file is dual licensed under the MIT and the University of Illinois Open
6*7c3d14c8STreehugger Robot// Source Licenses. See LICENSE.TXT for details.
7*7c3d14c8STreehugger Robot//
8*7c3d14c8STreehugger Robot//===----------------------------------------------------------------------===//
9*7c3d14c8STreehugger Robot
10*7c3d14c8STreehugger Robot#include "../assembly.h"
11*7c3d14c8STreehugger Robot
12*7c3d14c8STreehugger Robot//
13*7c3d14c8STreehugger Robot// Helper function used by compiler to restore ppc floating point registers at
14*7c3d14c8STreehugger Robot// the end of the function epilog.  This function returns to the address
15*7c3d14c8STreehugger Robot// in the LR slot.  So a function epilog must branch (b) not branch and link
16*7c3d14c8STreehugger Robot// (bl) to this function.
17*7c3d14c8STreehugger Robot// If the compiler wants to restore f27..f31, it does a "b restFP+52"
18*7c3d14c8STreehugger Robot//
19*7c3d14c8STreehugger Robot// This function should never be exported by a shared library.  Each linkage
20*7c3d14c8STreehugger Robot// unit carries its own copy of this function.
21*7c3d14c8STreehugger Robot//
22*7c3d14c8STreehugger RobotDEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(restFP)
23*7c3d14c8STreehugger Robot        lfd    f14,-144(r1)
24*7c3d14c8STreehugger Robot        lfd    f15,-136(r1)
25*7c3d14c8STreehugger Robot        lfd    f16,-128(r1)
26*7c3d14c8STreehugger Robot        lfd    f17,-120(r1)
27*7c3d14c8STreehugger Robot        lfd    f18,-112(r1)
28*7c3d14c8STreehugger Robot        lfd    f19,-104(r1)
29*7c3d14c8STreehugger Robot        lfd    f20,-96(r1)
30*7c3d14c8STreehugger Robot        lfd    f21,-88(r1)
31*7c3d14c8STreehugger Robot        lfd    f22,-80(r1)
32*7c3d14c8STreehugger Robot        lfd    f23,-72(r1)
33*7c3d14c8STreehugger Robot        lfd    f24,-64(r1)
34*7c3d14c8STreehugger Robot        lfd    f25,-56(r1)
35*7c3d14c8STreehugger Robot        lfd    f26,-48(r1)
36*7c3d14c8STreehugger Robot        lfd    f27,-40(r1)
37*7c3d14c8STreehugger Robot        lfd    f28,-32(r1)
38*7c3d14c8STreehugger Robot        lfd    f29,-24(r1)
39*7c3d14c8STreehugger Robot        lfd    f30,-16(r1)
40*7c3d14c8STreehugger Robot        lfd    f31,-8(r1)
41*7c3d14c8STreehugger Robot        lwz     r0,8(r1)
42*7c3d14c8STreehugger Robot        mtlr	r0
43*7c3d14c8STreehugger Robot        blr
44*7c3d14c8STreehugger Robot
45*7c3d14c8STreehugger RobotNO_EXEC_STACK_DIRECTIVE
46*7c3d14c8STreehugger Robot
47