diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-11-08 08:02:53 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-11-08 08:02:53 +0000 |
commit | 2c3267a14d9e81b7507ef2d9d7ea8b3bc5f7efe0 (patch) | |
tree | 5baf5280b91d06827536a7d8a11640a6aedc39f3 /lib/Target | |
parent | ba96b1a43da968e21c217ed05a65cfbe2a845f47 (diff) | |
download | external_llvm-2c3267a14d9e81b7507ef2d9d7ea8b3bc5f7efe0.zip external_llvm-2c3267a14d9e81b7507ef2d9d7ea8b3bc5f7efe0.tar.gz external_llvm-2c3267a14d9e81b7507ef2d9d7ea8b3bc5f7efe0.tar.bz2 |
Rename startFunctionStub to startGVStub since it's also used for GV non-lazy ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/ARM/ARMJITInfo.cpp | 10 | ||||
-rw-r--r-- | lib/Target/Alpha/AlphaJITInfo.cpp | 4 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCJITInfo.cpp | 8 | ||||
-rw-r--r-- | lib/Target/X86/X86JITInfo.cpp | 18 |
4 files changed, 20 insertions, 20 deletions
diff --git a/lib/Target/ARM/ARMJITInfo.cpp b/lib/Target/ARM/ARMJITInfo.cpp index 4118d6d..6ab0c92 100644 --- a/lib/Target/ARM/ARMJITInfo.cpp +++ b/lib/Target/ARM/ARMJITInfo.cpp @@ -135,9 +135,9 @@ ARMJITInfo::getLazyResolverFunction(JITCompilerFn F) { void *ARMJITInfo::emitGlobalValueNonLazyPtr(const GlobalValue *GV, void *Ptr, MachineCodeEmitter &MCE) { - MCE.startFunctionStub(GV, 4, 4); // FIXME: Rename this. + MCE.startGVStub(GV, 4, 4); MCE.emitWordLE((intptr_t)Ptr); - return MCE.finishFunctionStub(GV); + return MCE.finishGVStub(GV); } void *ARMJITInfo::emitFunctionStub(const Function* F, void *Fn, @@ -148,7 +148,7 @@ void *ARMJITInfo::emitFunctionStub(const Function* F, void *Fn, if (Fn != (void*)(intptr_t)ARMCompilationCallback) { // Branch to the corresponding function addr. // The stub is 8-byte size and 4-aligned. - MCE.startFunctionStub(F, 8, 4); + MCE.startGVStub(F, 8, 4); MCE.emitWordLE(0xe51ff004); // LDR PC, [PC,#-4] MCE.emitWordLE(addr); // addr of function } else { @@ -159,7 +159,7 @@ void *ARMJITInfo::emitFunctionStub(const Function* F, void *Fn, // // Branch and link to the compilation callback. // The stub is 16-byte size and 4-byte aligned. - MCE.startFunctionStub(F, 16, 4); + MCE.startGVStub(F, 16, 4); // Save LR so the callback can determine which stub called it. // The compilation callback is responsible for popping this prior // to returning. @@ -172,7 +172,7 @@ void *ARMJITInfo::emitFunctionStub(const Function* F, void *Fn, MCE.emitWordLE((intptr_t)ARMCompilationCallback); } - return MCE.finishFunctionStub(F); + return MCE.finishGVStub(F); } intptr_t ARMJITInfo::resolveRelocDestAddr(MachineRelocation *MR) const { diff --git a/lib/Target/Alpha/AlphaJITInfo.cpp b/lib/Target/Alpha/AlphaJITInfo.cpp index 4fd0ebc..8f36c1f 100644 --- a/lib/Target/Alpha/AlphaJITInfo.cpp +++ b/lib/Target/Alpha/AlphaJITInfo.cpp @@ -195,13 +195,13 @@ void *AlphaJITInfo::emitFunctionStub(const Function* F, void *Fn, MachineCodeEmitter &MCE) { //assert(Fn == AlphaCompilationCallback && "Where are you going?\n"); //Do things in a stupid slow way! - MCE.startFunctionStub(F, 19*4); + MCE.startGVStub(F, 19*4); void* Addr = (void*)(intptr_t)MCE.getCurrentPCValue(); for (int x = 0; x < 19; ++ x) MCE.emitWordLE(0); EmitBranchToAt(Addr, Fn); DOUT << "Emitting Stub to " << Fn << " at [" << Addr << "]\n"; - return MCE.finishFunctionStub(F); + return MCE.finishGVStub(F); } TargetJITInfo::LazyResolverFn diff --git a/lib/Target/PowerPC/PPCJITInfo.cpp b/lib/Target/PowerPC/PPCJITInfo.cpp index 89c6d49..b5de318 100644 --- a/lib/Target/PowerPC/PPCJITInfo.cpp +++ b/lib/Target/PowerPC/PPCJITInfo.cpp @@ -335,7 +335,7 @@ void *PPCJITInfo::emitFunctionStub(const Function* F, void *Fn, // call. The code is the same except for one bit of the last instruction. if (Fn != (void*)(intptr_t)PPC32CompilationCallback && Fn != (void*)(intptr_t)PPC64CompilationCallback) { - MCE.startFunctionStub(F, 7*4); + MCE.startGVStub(F, 7*4); intptr_t Addr = (intptr_t)MCE.getCurrentPCValue(); MCE.emitWordBE(0); MCE.emitWordBE(0); @@ -346,10 +346,10 @@ void *PPCJITInfo::emitFunctionStub(const Function* F, void *Fn, MCE.emitWordBE(0); EmitBranchToAt(Addr, (intptr_t)Fn, false, is64Bit); sys::Memory::InvalidateInstructionCache((void*)Addr, 7*4); - return MCE.finishFunctionStub(F); + return MCE.finishGVStub(F); } - MCE.startFunctionStub(F, 10*4); + MCE.startGVStub(F, 10*4); intptr_t Addr = (intptr_t)MCE.getCurrentPCValue(); if (is64Bit) { MCE.emitWordBE(0xf821ffb1); // stdu r1,-80(r1) @@ -374,7 +374,7 @@ void *PPCJITInfo::emitFunctionStub(const Function* F, void *Fn, MCE.emitWordBE(0); EmitBranchToAt(BranchAddr, (intptr_t)Fn, true, is64Bit); sys::Memory::InvalidateInstructionCache((void*)Addr, 10*4); - return MCE.finishFunctionStub(F); + return MCE.finishGVStub(F); } diff --git a/lib/Target/X86/X86JITInfo.cpp b/lib/Target/X86/X86JITInfo.cpp index ee46657..dee5deb 100644 --- a/lib/Target/X86/X86JITInfo.cpp +++ b/lib/Target/X86/X86JITInfo.cpp @@ -416,14 +416,14 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) { void *X86JITInfo::emitGlobalValueNonLazyPtr(const GlobalValue* GV, void *ptr, MachineCodeEmitter &MCE) { #if defined (X86_64_JIT) - MCE.startFunctionStub(GV, 8, 8); + MCE.startGVStub(GV, 8, 8); MCE.emitWordLE((unsigned)(intptr_t)ptr); MCE.emitWordLE((unsigned)(((intptr_t)ptr) >> 32)); #else - MCE.startFunctionStub(GV, 4, 4); + MCE.startGVStub(GV, 4, 4); MCE.emitWordLE((intptr_t)ptr); #endif - return MCE.finishFunctionStub(GV); + return MCE.finishGVStub(GV); } void *X86JITInfo::emitFunctionStub(const Function* F, void *Fn, @@ -438,7 +438,7 @@ void *X86JITInfo::emitFunctionStub(const Function* F, void *Fn, #endif if (NotCC) { #if defined (X86_64_JIT) - MCE.startFunctionStub(F, 13, 4); + MCE.startGVStub(F, 13, 4); MCE.emitByte(0x49); // REX prefix MCE.emitByte(0xB8+2); // movabsq r10 MCE.emitWordLE((unsigned)(intptr_t)Fn); @@ -447,15 +447,15 @@ void *X86JITInfo::emitFunctionStub(const Function* F, void *Fn, MCE.emitByte(0xFF); // jmpq *r10 MCE.emitByte(2 | (4 << 3) | (3 << 6)); #else - MCE.startFunctionStub(F, 5, 4); + MCE.startGVStub(F, 5, 4); MCE.emitByte(0xE9); MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4); #endif - return MCE.finishFunctionStub(F); + return MCE.finishGVStub(F); } #if defined (X86_64_JIT) - MCE.startFunctionStub(F, 14, 4); + MCE.startGVStub(F, 14, 4); MCE.emitByte(0x49); // REX prefix MCE.emitByte(0xB8+2); // movabsq r10 MCE.emitWordLE((unsigned)(intptr_t)Fn); @@ -464,14 +464,14 @@ void *X86JITInfo::emitFunctionStub(const Function* F, void *Fn, MCE.emitByte(0xFF); // callq *r10 MCE.emitByte(2 | (2 << 3) | (3 << 6)); #else - MCE.startFunctionStub(F, 6, 4); + MCE.startGVStub(F, 6, 4); MCE.emitByte(0xE8); // Call with 32 bit pc-rel destination... MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4); #endif MCE.emitByte(0xCD); // Interrupt - Just a marker identifying the stub! - return MCE.finishFunctionStub(F); + return MCE.finishGVStub(F); } /// getPICJumpTableEntry - Returns the value of the jumptable entry for the |