aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCSubtarget.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-11 23:22:45 +0000
committerChris Lattner <sabre@nondot.org>2006-12-11 23:22:45 +0000
commit57fc62c8d2bf056b0d2a0e3d1b82b3b787b899f8 (patch)
tree617a5f64b9a640f0a39f610fe14696373a1a3bc2 /lib/Target/PowerPC/PPCSubtarget.h
parenta77fa7edbfb999c487c6da89fcfecafb4b9e83be (diff)
downloadexternal_llvm-57fc62c8d2bf056b0d2a0e3d1b82b3b787b899f8.zip
external_llvm-57fc62c8d2bf056b0d2a0e3d1b82b3b787b899f8.tar.gz
external_llvm-57fc62c8d2bf056b0d2a0e3d1b82b3b787b899f8.tar.bz2
Another step forward in PPC64 JIT support: we now no-longer need stubs
emitted for external globals in PPC64-JIT-PIC mode (which is good because we didn't handle them before!). This also fixes a bug handling the picbase delta, which we would get wrong in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCSubtarget.h')
-rw-r--r--lib/Target/PowerPC/PPCSubtarget.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCSubtarget.h b/lib/Target/PowerPC/PPCSubtarget.h
index 1cce24d..e8ad25f 100644
--- a/lib/Target/PowerPC/PPCSubtarget.h
+++ b/lib/Target/PowerPC/PPCSubtarget.h
@@ -21,9 +21,13 @@
namespace llvm {
class Module;
-
+class GlobalValue;
+class TargetMachine;
+
class PPCSubtarget : public TargetSubtarget {
protected:
+ const TargetMachine &TM;
+
/// stackAlignment - The minimum alignment known to hold of the stack frame on
/// entry to the function and which must be maintained by every function.
unsigned StackAlignment;
@@ -40,15 +44,21 @@ protected:
bool HasFSQRT;
bool HasSTFIWX;
bool IsDarwin;
+ bool HasLazyResolverStubs;
public:
/// This constructor initializes the data members to match that
/// of the specified module.
///
- PPCSubtarget(const Module &M, const std::string &FS, bool is64Bit);
+ PPCSubtarget(const TargetMachine &TM, const Module &M,
+ const std::string &FS, bool is64Bit);
/// ParseSubtargetFeatures - Parses features string setting specified
/// subtarget options. Definition of function is auto generated by tblgen.
void ParseSubtargetFeatures(const std::string &FS, const std::string &CPU);
+
+ /// SetJITMode - This is called to inform the subtarget info that we are
+ /// producing code for the JIT.
+ void SetJITMode();
/// getStackAlignment - Returns the minimum alignment known to hold of the
/// stack frame on entry to the function and which must be maintained by every
@@ -78,6 +88,10 @@ public:
/// has64BitSupport() returns true.
bool use64BitRegs() const { return Use64BitRegs; }
+ /// hasLazyResolverStub - Return true if accesses to the specified global have
+ /// to go through a dyld lazy resolution stub. This means that an extra load
+ /// is required to get the address of the global.
+ bool hasLazyResolverStub(const GlobalValue *GV) const;
// Specific obvious features.
bool hasFSQRT() const { return HasFSQRT; }