xref: /minix3/sys/external/bsd/compiler_rt/dist/lib/builtins/ppc/saveFP.S (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc//===-- saveFP.S - Implement saveFP ---------------------------------------===//
2*0a6a1f1dSLionel Sambuc//
3*0a6a1f1dSLionel Sambuc//                     The LLVM Compiler Infrastructure
4*0a6a1f1dSLionel Sambuc//
5*0a6a1f1dSLionel Sambuc// This file is dual licensed under the MIT and the University of Illinois Open
6*0a6a1f1dSLionel Sambuc// Source Licenses. See LICENSE.TXT for details.
7*0a6a1f1dSLionel Sambuc//
8*0a6a1f1dSLionel Sambuc//===----------------------------------------------------------------------===//
9*0a6a1f1dSLionel Sambuc
10*0a6a1f1dSLionel Sambuc#include "../assembly.h"
11*0a6a1f1dSLionel Sambuc
12*0a6a1f1dSLionel Sambuc//
13*0a6a1f1dSLionel Sambuc// Helper function used by compiler to save ppc floating point registers in
14*0a6a1f1dSLionel Sambuc// function prologs.  This routines also saves r0 in the LR slot.
15*0a6a1f1dSLionel Sambuc// If the compiler wants to save f27..f31, it does a "bl saveFP+52"
16*0a6a1f1dSLionel Sambuc//
17*0a6a1f1dSLionel Sambuc// This function should never be exported by a shared library.  Each linkage
18*0a6a1f1dSLionel Sambuc// unit carries its own copy of this function.
19*0a6a1f1dSLionel Sambuc//
20*0a6a1f1dSLionel SambucDEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(saveFP)
21*0a6a1f1dSLionel Sambuc	stfd    f14,-144(r1)
22*0a6a1f1dSLionel Sambuc        stfd    f15,-136(r1)
23*0a6a1f1dSLionel Sambuc        stfd    f16,-128(r1)
24*0a6a1f1dSLionel Sambuc        stfd    f17,-120(r1)
25*0a6a1f1dSLionel Sambuc        stfd    f18,-112(r1)
26*0a6a1f1dSLionel Sambuc        stfd    f19,-104(r1)
27*0a6a1f1dSLionel Sambuc        stfd    f20,-96(r1)
28*0a6a1f1dSLionel Sambuc        stfd    f21,-88(r1)
29*0a6a1f1dSLionel Sambuc        stfd    f22,-80(r1)
30*0a6a1f1dSLionel Sambuc        stfd    f23,-72(r1)
31*0a6a1f1dSLionel Sambuc        stfd    f24,-64(r1)
32*0a6a1f1dSLionel Sambuc        stfd    f25,-56(r1)
33*0a6a1f1dSLionel Sambuc        stfd    f26,-48(r1)
34*0a6a1f1dSLionel Sambuc        stfd    f27,-40(r1)
35*0a6a1f1dSLionel Sambuc        stfd    f28,-32(r1)
36*0a6a1f1dSLionel Sambuc        stfd    f29,-24(r1)
37*0a6a1f1dSLionel Sambuc        stfd    f30,-16(r1)
38*0a6a1f1dSLionel Sambuc        stfd    f31,-8(r1)
39*0a6a1f1dSLionel Sambuc        stw      r0,8(r1)
40*0a6a1f1dSLionel Sambuc        blr
41