Use indirect calls in PowerPC JIT.

See PR5201. There is no way to know if direct calls will be within the allowed
range for BL. Hence emit all calls as indirect when in JIT mode.
Without this long-running applications will fail to JIT on PowerPC with a
relocation failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Torok Edwin
2010-08-04 20:47:44 +00:00
parent a54e0cca4b
commit 0e3a1a8f8f
3 changed files with 31 additions and 10 deletions

View File

@ -69,6 +69,7 @@ PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &FS,
, HasFSQRT(false)
, HasSTFIWX(false)
, HasLazyResolverStubs(false)
, IsJITCodeModel(false)
, DarwinVers(0) {
// Determine default and user specified characteristics
@ -117,6 +118,9 @@ void PPCSubtarget::SetJITMode() {
// everything is. This matters for PPC64, which codegens in PIC mode without
// stubs.
HasLazyResolverStubs = false;
// Calls to external functions need to use indirect calls
IsJITCodeModel = true;
}