aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineCodeEmitter.h
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-08-05 00:11:21 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2009-08-05 00:11:21 +0000
commite55fef36a93badf6c4925ea2455a1ca6b361357e (patch)
treeca3cfc71e21e717b62b0dfc93bd1af9bbb0518db /include/llvm/CodeGen/MachineCodeEmitter.h
parent339685269f8bec31eeb0edb98c832dde277c9c7d (diff)
downloadexternal_llvm-e55fef36a93badf6c4925ea2455a1ca6b361357e.zip
external_llvm-e55fef36a93badf6c4925ea2455a1ca6b361357e.tar.gz
external_llvm-e55fef36a93badf6c4925ea2455a1ca6b361357e.tar.bz2
1) Proper emit displacements for x86, using absolute relocations where necessary
for ELF to work. 2) RIP addressing: Use SIB bytes for absolute relocations where RegBase=0, IndexReg=0. 3) The JIT can get the real address of cstpools and jmptables during code emission, fix that for object code emission git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78129 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineCodeEmitter.h')
-rw-r--r--include/llvm/CodeGen/MachineCodeEmitter.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h
index 20a9ad7..707b020 100644
--- a/include/llvm/CodeGen/MachineCodeEmitter.h
+++ b/include/llvm/CodeGen/MachineCodeEmitter.h
@@ -280,6 +280,13 @@ public:
return CurBufferPtr-BufferBegin;
}
+ /// earlyResolveAddresses - True if the code emitter can use symbol addresses
+ /// during code emission time. The JIT is capable of doing this because it
+ /// creates jump tables or constant pools in memory on the fly while the
+ /// object code emitters rely on a linker to have real addresses and should
+ /// use relocations instead.
+ virtual bool earlyResolveAddresses() const = 0;
+
/// addRelocation - Whenever a relocatable address is needed, it should be
/// noted with this interface.
virtual void addRelocation(const MachineRelocation &MR) = 0;