r197406 - Support EABIHF environment on ARM.
Joerg Sonnenberger
joerg at bec.de
Mon Dec 16 11:16:05 PST 2013
Author: joerg
Date: Mon Dec 16 13:16:04 2013
New Revision: 197406
URL: http://llvm.org/viewvc/llvm-project?rev=197406&view=rev
Log:
Support EABIHF environment on ARM.
Modified:
cfe/trunk/lib/CodeGen/TargetInfo.cpp
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=197406&r1=197405&r2=197406&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Mon Dec 16 13:16:04 2013
@@ -3074,6 +3074,7 @@ public:
switch (getTarget().getTriple().getEnvironment()) {
case llvm::Triple::Android:
case llvm::Triple::EABI:
+ case llvm::Triple::EABIHF:
case llvm::Triple::GNUEABI:
case llvm::Triple::GNUEABIHF:
return true;
@@ -3082,6 +3083,16 @@ public:
}
}
+ bool isEABIHF() const {
+ switch (getTarget().getTriple().getEnvironment()) {
+ case llvm::Triple::EABIHF:
+ case llvm::Triple::GNUEABIHF:
+ return true;
+ default:
+ return false;
+ }
+ }
+
ABIKind getABIKind() const { return Kind; }
private:
@@ -3215,7 +3226,7 @@ void ARMABIInfo::computeInfo(CGFunctionI
/// Return the default calling convention that LLVM will use.
llvm::CallingConv::ID ARMABIInfo::getLLVMDefaultCC() const {
// The default calling convention that LLVM will infer.
- if (getTarget().getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
+ if (isEABIHF())
return llvm::CallingConv::ARM_AAPCS_VFP;
else if (isEABI())
return llvm::CallingConv::ARM_AAPCS;
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=197406&r1=197405&r2=197406&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Dec 16 13:16:04 2013
@@ -652,6 +652,9 @@ StringRef tools::arm::getARMFloatABI(con
case llvm::Triple::GNUEABI:
FloatABI = "softfp";
break;
+ case llvm::Triple::EABIHF:
+ FloatABI = "hard";
+ break;
case llvm::Triple::EABI:
// EABI is always AAPCS, and if it was not marked 'hard', it's softfp
FloatABI = "softfp";
@@ -757,6 +760,7 @@ void Clang::AddARMTargetArgs(const ArgLi
case llvm::Triple::GNUEABIHF:
ABIName = "aapcs-linux";
break;
+ case llvm::Triple::EABIHF:
case llvm::Triple::EABI:
ABIName = "aapcs";
break;
More information about the cfe-commits
mailing list