aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-11-10 01:08:07 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-11-10 01:08:07 +0000
commit8af22c446b6eefa8dddd2412c7d779feb4c7bf0a (patch)
treecf7ecb5e996d39b61ad273edb0a6055c6a22c3dd /lib/Target
parentd1854af7e5d95da2f2e1de1fb2c5b67adce7ea05 (diff)
downloadexternal_llvm-8af22c446b6eefa8dddd2412c7d779feb4c7bf0a.zip
external_llvm-8af22c446b6eefa8dddd2412c7d779feb4c7bf0a.tar.gz
external_llvm-8af22c446b6eefa8dddd2412c7d779feb4c7bf0a.tar.bz2
Rename isGVNonLazyPtr to isIndirectSym to reflect how it will be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/ARM/ARMCodeEmitter.cpp2
-rw-r--r--lib/Target/ARM/ARMJITInfo.cpp4
-rw-r--r--lib/Target/ARM/ARMJITInfo.h8
-rw-r--r--lib/Target/X86/X86CodeEmitter.cpp26
-rw-r--r--lib/Target/X86/X86JITInfo.cpp4
-rw-r--r--lib/Target/X86/X86JITInfo.h10
6 files changed, 27 insertions, 27 deletions
diff --git a/lib/Target/ARM/ARMCodeEmitter.cpp b/lib/Target/ARM/ARMCodeEmitter.cpp
index 92d8713..ddd2564 100644
--- a/lib/Target/ARM/ARMCodeEmitter.cpp
+++ b/lib/Target/ARM/ARMCodeEmitter.cpp
@@ -337,7 +337,7 @@ void ARMCodeEmitter::emitConstPoolInstruction(const MachineInstr &MI) {
if (GV) {
assert(!ACPV->isStub() && "Don't know how to deal this yet!");
if (ACPV->isNonLazyPointer())
- MCE.addRelocation(MachineRelocation::getGVNonLazyPtr(
+ MCE.addRelocation(MachineRelocation::getIndirectSymbol(
MCE.getCurrentPCOffset(), ARM::reloc_arm_machine_cp_entry, GV,
(intptr_t)ACPV, false));
else
diff --git a/lib/Target/ARM/ARMJITInfo.cpp b/lib/Target/ARM/ARMJITInfo.cpp
index c88d864..3ce3117 100644
--- a/lib/Target/ARM/ARMJITInfo.cpp
+++ b/lib/Target/ARM/ARMJITInfo.cpp
@@ -129,8 +129,8 @@ ARMJITInfo::getLazyResolverFunction(JITCompilerFn F) {
return ARMCompilationCallback;
}
-void *ARMJITInfo::emitGlobalValueNonLazyPtr(const GlobalValue *GV, void *Ptr,
- MachineCodeEmitter &MCE) {
+void *ARMJITInfo::emitGlobalValueIndirectSym(const GlobalValue *GV, void *Ptr,
+ MachineCodeEmitter &MCE) {
MCE.startGVStub(GV, 4, 4);
MCE.emitWordLE((intptr_t)Ptr);
return MCE.finishGVStub(GV);
diff --git a/lib/Target/ARM/ARMJITInfo.h b/lib/Target/ARM/ARMJITInfo.h
index fe1ea10..a35611e 100644
--- a/lib/Target/ARM/ARMJITInfo.h
+++ b/lib/Target/ARM/ARMJITInfo.h
@@ -51,10 +51,10 @@ namespace llvm {
///
virtual void replaceMachineCodeForFunction(void *Old, void *New);
- /// emitGlobalValueNonLazyPtr - Use the specified MachineCodeEmitter object
- /// to emit a Mac OS X non-lazy pointer which contains the address of the
- /// specified ptr.
- virtual void *emitGlobalValueNonLazyPtr(const GlobalValue *GV, void *Ptr,
+ /// emitGlobalValueIndirectSym - Use the specified MachineCodeEmitter object
+ /// to emit an indirect symbol which contains the address of the specified
+ /// ptr.
+ virtual void *emitGlobalValueIndirectSym(const GlobalValue* GV, void *ptr,
MachineCodeEmitter &MCE);
/// emitFunctionStub - Use the specified MachineCodeEmitter object to emit a
diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp
index fabb67e..f8bff1a 100644
--- a/lib/Target/X86/X86CodeEmitter.cpp
+++ b/lib/Target/X86/X86CodeEmitter.cpp
@@ -73,7 +73,7 @@ namespace {
void emitPCRelativeBlockAddress(MachineBasicBlock *MBB);
void emitGlobalAddress(GlobalValue *GV, unsigned Reloc,
intptr_t Disp = 0, intptr_t PCAdj = 0,
- bool NeedStub = false, bool IsNonLazy = false);
+ bool NeedStub = false, bool Indirect = false);
void emitExternalSymbolAddress(const char *ES, unsigned Reloc);
void emitConstPoolAddress(unsigned CPI, unsigned Reloc, intptr_t Disp = 0,
intptr_t PCAdj = 0);
@@ -155,15 +155,15 @@ void Emitter::emitGlobalAddress(GlobalValue *GV, unsigned Reloc,
intptr_t Disp /* = 0 */,
intptr_t PCAdj /* = 0 */,
bool NeedStub /* = false */,
- bool isNonLazy /* = false */) {
+ bool Indirect /* = false */) {
intptr_t RelocCST = 0;
if (Reloc == X86::reloc_picrel_word)
RelocCST = PICBaseOffset;
else if (Reloc == X86::reloc_pcrel_word)
RelocCST = PCAdj;
- MachineRelocation MR = isNonLazy
- ? MachineRelocation::getGVNonLazyPtr(MCE.getCurrentPCOffset(), Reloc,
- GV, RelocCST, NeedStub)
+ MachineRelocation MR = Indirect
+ ? MachineRelocation::getIndirectSymbol(MCE.getCurrentPCOffset(), Reloc,
+ GV, RelocCST, NeedStub)
: MachineRelocation::getGV(MCE.getCurrentPCOffset(), Reloc,
GV, RelocCST, NeedStub);
MCE.addRelocation(MR);
@@ -289,9 +289,9 @@ void Emitter::emitDisplacementField(const MachineOperand *RelocOp,
unsigned rt = Is64BitMode ? X86::reloc_pcrel_word
: (IsPIC ? X86::reloc_picrel_word : X86::reloc_absolute_word);
bool NeedStub = isa<Function>(RelocOp->getGlobal());
- bool isNonLazy = gvNeedsNonLazyPtr(RelocOp->getGlobal());
+ bool Indirect = gvNeedsNonLazyPtr(RelocOp->getGlobal());
emitGlobalAddress(RelocOp->getGlobal(), rt, RelocOp->getOffset(),
- PCAdj, NeedStub, isNonLazy);
+ PCAdj, NeedStub, Indirect);
} else if (RelocOp->isCPI()) {
unsigned rt = Is64BitMode ? X86::reloc_pcrel_word : X86::reloc_picrel_word;
emitConstPoolAddress(RelocOp->getIndex(), rt,
@@ -610,9 +610,9 @@ void Emitter::emitInstruction(const MachineInstr &MI,
rt = X86::reloc_absolute_dword; // FIXME: add X86II flag?
if (MO1.isGlobal()) {
bool NeedStub = isa<Function>(MO1.getGlobal());
- bool isNonLazy = gvNeedsNonLazyPtr(MO1.getGlobal());
+ bool Indirect = gvNeedsNonLazyPtr(MO1.getGlobal());
emitGlobalAddress(MO1.getGlobal(), rt, MO1.getOffset(), 0,
- NeedStub, isNonLazy);
+ NeedStub, Indirect);
} else if (MO1.isSymbol())
emitExternalSymbolAddress(MO1.getSymbolName(), rt);
else if (MO1.isCPI())
@@ -688,9 +688,9 @@ void Emitter::emitInstruction(const MachineInstr &MI,
rt = X86::reloc_absolute_word; // FIXME: add X86II flag?
if (MO1.isGlobal()) {
bool NeedStub = isa<Function>(MO1.getGlobal());
- bool isNonLazy = gvNeedsNonLazyPtr(MO1.getGlobal());
+ bool Indirect = gvNeedsNonLazyPtr(MO1.getGlobal());
emitGlobalAddress(MO1.getGlobal(), rt, MO1.getOffset(), 0,
- NeedStub, isNonLazy);
+ NeedStub, Indirect);
} else if (MO1.isSymbol())
emitExternalSymbolAddress(MO1.getSymbolName(), rt);
else if (MO1.isCPI())
@@ -726,9 +726,9 @@ void Emitter::emitInstruction(const MachineInstr &MI,
rt = X86::reloc_absolute_word; // FIXME: add X86II flag?
if (MO.isGlobal()) {
bool NeedStub = isa<Function>(MO.getGlobal());
- bool isNonLazy = gvNeedsNonLazyPtr(MO.getGlobal());
+ bool Indirect = gvNeedsNonLazyPtr(MO.getGlobal());
emitGlobalAddress(MO.getGlobal(), rt, MO.getOffset(), 0,
- NeedStub, isNonLazy);
+ NeedStub, Indirect);
} else if (MO.isSymbol())
emitExternalSymbolAddress(MO.getSymbolName(), rt);
else if (MO.isCPI())
diff --git a/lib/Target/X86/X86JITInfo.cpp b/lib/Target/X86/X86JITInfo.cpp
index dee5deb..9519996 100644
--- a/lib/Target/X86/X86JITInfo.cpp
+++ b/lib/Target/X86/X86JITInfo.cpp
@@ -413,8 +413,8 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
return X86CompilationCallback;
}
-void *X86JITInfo::emitGlobalValueNonLazyPtr(const GlobalValue* GV, void *ptr,
- MachineCodeEmitter &MCE) {
+void *X86JITInfo::emitGlobalValueIndirectSym(const GlobalValue* GV, void *ptr,
+ MachineCodeEmitter &MCE) {
#if defined (X86_64_JIT)
MCE.startGVStub(GV, 8, 8);
MCE.emitWordLE((unsigned)(intptr_t)ptr);
diff --git a/lib/Target/X86/X86JITInfo.h b/lib/Target/X86/X86JITInfo.h
index 65a417d..dd26636 100644
--- a/lib/Target/X86/X86JITInfo.h
+++ b/lib/Target/X86/X86JITInfo.h
@@ -37,11 +37,11 @@ namespace llvm {
///
virtual void replaceMachineCodeForFunction(void *Old, void *New);
- /// emitGlobalValueNonLazyPtr - Use the specified MachineCodeEmitter object
- /// to emit a Mac OS X non-lazy pointer which contains the address of the
- /// specified ptr.
- virtual void *emitGlobalValueNonLazyPtr(const GlobalValue* GV, void *ptr,
- MachineCodeEmitter &MCE);
+ /// emitGlobalValueIndirectSym - Use the specified MachineCodeEmitter object
+ /// to emit an indirect symbol which contains the address of the specified
+ /// ptr.
+ virtual void *emitGlobalValueIndirectSym(const GlobalValue* GV, void *ptr,
+ MachineCodeEmitter &MCE);
/// emitFunctionStub - Use the specified MachineCodeEmitter object to emit a
/// small native function that simply calls the function at the specified