summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCSubtarget.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/PowerPC/PPCSubtarget.h')
-rw-r--r--lib/Target/PowerPC/PPCSubtarget.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/lib/Target/PowerPC/PPCSubtarget.h b/lib/Target/PowerPC/PPCSubtarget.h
index 55fec1cb6d99..d96c2893aee9 100644
--- a/lib/Target/PowerPC/PPCSubtarget.h
+++ b/lib/Target/PowerPC/PPCSubtarget.h
@@ -78,7 +78,7 @@ protected:
/// 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;
+ Align StackAlignment;
/// Selected instruction itineraries (one entry per itinerary class.)
InstrItineraryData InstrItins;
@@ -166,7 +166,7 @@ public:
/// getStackAlignment - Returns the minimum alignment known to hold of the
/// stack frame on entry to the function and which must be maintained by every
/// function for this subtarget.
- unsigned getStackAlignment() const { return StackAlignment; }
+ Align getStackAlignment() const { return StackAlignment; }
/// getDarwinDirective - Returns the -m directive specified for the cpu.
///
@@ -210,7 +210,11 @@ public:
/// instructions, regardless of whether we are in 32-bit or 64-bit mode.
bool has64BitSupport() const { return Has64BitSupport; }
// useSoftFloat - Return true if soft-float option is turned on.
- bool useSoftFloat() const { return !HasHardFloat; }
+ bool useSoftFloat() const {
+ if (isAIXABI() && !HasHardFloat)
+ report_fatal_error("soft-float is not yet supported on AIX.");
+ return !HasHardFloat;
+ }
/// use64BitRegs - Return true if in 64-bit mode or if we should use 64-bit
/// registers in 32-bit mode when possible. This can only true if
@@ -277,11 +281,11 @@ public:
bool hasDirectMove() const { return HasDirectMove; }
bool isQPXStackUnaligned() const { return IsQPXStackUnaligned; }
- unsigned getPlatformStackAlignment() const {
+ Align getPlatformStackAlignment() const {
if ((hasQPX() || isBGQ()) && !isQPXStackUnaligned())
- return 32;
+ return Align(32);
- return 16;
+ return Align(16);
}
// DarwinABI has a 224-byte red zone. PPC32 SVR4ABI(Non-DarwinABI) has no
@@ -316,6 +320,9 @@ public:
bool isSVR4ABI() const { return !isDarwinABI() && !isAIXABI(); }
bool isELFv2ABI() const;
+ bool is64BitELFABI() const { return isSVR4ABI() && isPPC64(); }
+ bool is32BitELFABI() const { return isSVR4ABI() && !isPPC64(); }
+
/// Originally, this function return hasISEL(). Now we always enable it,
/// but may expand the ISEL instruction later.
bool enableEarlyIfConversion() const override { return true; }
@@ -337,9 +344,8 @@ public:
bool enableSubRegLiveness() const override;
- /// classifyGlobalReference - Classify a global variable reference for the
- /// current subtarget accourding to how we should reference it.
- unsigned char classifyGlobalReference(const GlobalValue *GV) const;
+ /// True if the GV will be accessed via an indirect symbol.
+ bool isGVIndirectSymbol(const GlobalValue *GV) const;
bool isXRaySupported() const override { return IsPPC64 && IsLittleEndian; }
};