1*3cab2bb3Spatrick//===-- restFP.S - Implement restFP ---------------------------------------===// 2*3cab2bb3Spatrick// 3*3cab2bb3Spatrick// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*3cab2bb3Spatrick// See https://llvm.org/LICENSE.txt for license information. 5*3cab2bb3Spatrick// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*3cab2bb3Spatrick// 7*3cab2bb3Spatrick//===----------------------------------------------------------------------===// 8*3cab2bb3Spatrick 9*3cab2bb3Spatrick#include "../assembly.h" 10*3cab2bb3Spatrick 11*3cab2bb3Spatrick// 12*3cab2bb3Spatrick// Helper function used by compiler to restore ppc floating point registers at 13*3cab2bb3Spatrick// the end of the function epilog. This function returns to the address 14*3cab2bb3Spatrick// in the LR slot. So a function epilog must branch (b) not branch and link 15*3cab2bb3Spatrick// (bl) to this function. 16*3cab2bb3Spatrick// If the compiler wants to restore f27..f31, it does a "b restFP+52" 17*3cab2bb3Spatrick// 18*3cab2bb3Spatrick// This function should never be exported by a shared library. Each linkage 19*3cab2bb3Spatrick// unit carries its own copy of this function. 20*3cab2bb3Spatrick// 21*3cab2bb3SpatrickDEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(restFP) 22*3cab2bb3Spatrick lfd f14,-144(r1) 23*3cab2bb3Spatrick lfd f15,-136(r1) 24*3cab2bb3Spatrick lfd f16,-128(r1) 25*3cab2bb3Spatrick lfd f17,-120(r1) 26*3cab2bb3Spatrick lfd f18,-112(r1) 27*3cab2bb3Spatrick lfd f19,-104(r1) 28*3cab2bb3Spatrick lfd f20,-96(r1) 29*3cab2bb3Spatrick lfd f21,-88(r1) 30*3cab2bb3Spatrick lfd f22,-80(r1) 31*3cab2bb3Spatrick lfd f23,-72(r1) 32*3cab2bb3Spatrick lfd f24,-64(r1) 33*3cab2bb3Spatrick lfd f25,-56(r1) 34*3cab2bb3Spatrick lfd f26,-48(r1) 35*3cab2bb3Spatrick lfd f27,-40(r1) 36*3cab2bb3Spatrick lfd f28,-32(r1) 37*3cab2bb3Spatrick lfd f29,-24(r1) 38*3cab2bb3Spatrick lfd f30,-16(r1) 39*3cab2bb3Spatrick lfd f31,-8(r1) 40*3cab2bb3Spatrick lwz r0,8(r1) 41*3cab2bb3Spatrick mtlr r0 42*3cab2bb3Spatrick blr 43*3cab2bb3Spatrick 44*3cab2bb3SpatrickNO_EXEC_STACK_DIRECTIVE 45*3cab2bb3Spatrick 46