1276789Sdim//===-- restFP.S - Implement restFP ---------------------------------------===//
2276789Sdim//
3276789Sdim//                     The LLVM Compiler Infrastructure
4276789Sdim//
5276789Sdim// This file is dual licensed under the MIT and the University of Illinois Open
6276789Sdim// Source Licenses. See LICENSE.TXT for details.
7276789Sdim//
8276789Sdim//===----------------------------------------------------------------------===//
9276789Sdim
10276789Sdim#include "../assembly.h"
11276789Sdim
12276789Sdim//
13276789Sdim// Helper function used by compiler to restore ppc floating point registers at
14276789Sdim// the end of the function epilog.  This function returns to the address
15276789Sdim// in the LR slot.  So a function epilog must branch (b) not branch and link
16276789Sdim// (bl) to this function.
17276789Sdim// If the compiler wants to restore f27..f31, it does a "b restFP+52"
18276789Sdim//
19276789Sdim// This function should never be exported by a shared library.  Each linkage
20276789Sdim// unit carries its own copy of this function.
21276789Sdim//
22276789SdimDEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(restFP)
23276789Sdim        lfd    f14,-144(r1)
24276789Sdim        lfd    f15,-136(r1)
25276789Sdim        lfd    f16,-128(r1)
26276789Sdim        lfd    f17,-120(r1)
27276789Sdim        lfd    f18,-112(r1)
28276789Sdim        lfd    f19,-104(r1)
29276789Sdim        lfd    f20,-96(r1)
30276789Sdim        lfd    f21,-88(r1)
31276789Sdim        lfd    f22,-80(r1)
32276789Sdim        lfd    f23,-72(r1)
33276789Sdim        lfd    f24,-64(r1)
34276789Sdim        lfd    f25,-56(r1)
35276789Sdim        lfd    f26,-48(r1)
36276789Sdim        lfd    f27,-40(r1)
37276789Sdim        lfd    f28,-32(r1)
38276789Sdim        lfd    f29,-24(r1)
39276789Sdim        lfd    f30,-16(r1)
40276789Sdim        lfd    f31,-8(r1)
41276789Sdim        lwz     r0,8(r1)
42276789Sdim        mtlr	r0
43276789Sdim        blr
44