From fee6aaf683edfdfc8e5d6ffd17821f7d52936a53 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 17 Feb 2015 06:45:15 +0000 Subject: Move ABI handling and 64-bitness to the PowerPC target machine. This required changing how the computation of the ABI is handled and how some of the checks for ABI/target are done. llvm-svn: 229471 --- llvm/lib/Target/PowerPC/PPCSubtarget.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.h') diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.h b/llvm/lib/Target/PowerPC/PPCSubtarget.h index ce17c1ea779..704a226ed33 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.h +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.h @@ -114,11 +114,6 @@ protected: bool HasICBT; bool HasInvariantFunctionDescriptors; - enum { - PPC_ABI_UNKNOWN, - PPC_ABI_ELFv1, - PPC_ABI_ELFv2 - } TargetABI; const PPCTargetMachine &TM; PPCFrameLowering FrameLowering; PPCInstrInfo InstrInfo; @@ -177,7 +172,7 @@ private: public: /// isPPC64 - Return true if we are generating code for 64-bit pointer mode. /// - bool isPPC64() const { return IsPPC64; } + bool isPPC64() const; /// has64BitSupport - Return true if the selected CPU supports 64-bit /// instructions, regardless of whether we are in 32-bit or 64-bit mode. @@ -245,9 +240,9 @@ public: bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); } bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); } - bool isDarwinABI() const { return isDarwin(); } - bool isSVR4ABI() const { return !isDarwin(); } - bool isELFv2ABI() const { return TargetABI == PPC_ABI_ELFv2; } + bool isDarwinABI() const { return isTargetMachO() || isDarwin(); } + bool isSVR4ABI() const { return !isDarwinABI(); } + bool isELFv2ABI() const; bool enableEarlyIfConversion() const override { return hasISEL(); } -- cgit v1.2.3