[llvm-commits] [llvm] r153886 - in /llvm/trunk/lib/Target/PowerPC: PPCSubtarget.h PPCTargetMachine.cpp
Hal Finkel
hfinkel at anl.gov
Mon Apr 2 12:09:05 PDT 2012
Author: hfinkel
Date: Mon Apr 2 14:09:04 2012
New Revision: 153886
URL: http://llvm.org/viewvc/llvm-project?rev=153886&view=rev
Log:
The binutils for the IBM BG/P are too old to support CFI.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h
llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h?rev=153886&r1=153885&r2=153886&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h Mon Apr 2 14:09:04 2012
@@ -145,6 +145,8 @@
/// isDarwin - True if this is any darwin platform.
bool isDarwin() const { return TargetTriple.isMacOSX(); }
+ /// isBGP - True if this is a BG/P platform.
+ bool isBGP() const { return TargetTriple.getVendor() == Triple::BGP; }
bool isDarwinABI() const { return isDarwin(); }
bool isSVR4ABI() const { return !isDarwin(); }
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=153886&r1=153885&r2=153886&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Mon Apr 2 14:09:04 2012
@@ -39,6 +39,10 @@
FrameLowering(Subtarget), JITInfo(*this, is64Bit),
TLInfo(*this), TSInfo(*this),
InstrItins(Subtarget.getInstrItineraryData()) {
+
+ // The binutils for the BG/P are too old for CFI.
+ if (Subtarget.isBGP())
+ setMCUseCFI(false);
}
void PPC32TargetMachine::anchor() { }
More information about the llvm-commits
mailing list