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