Recognize EABIHF as environment and use it for RTAPI + VFP.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197405 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Joerg Sonnenberger 2013-12-16 18:51:28 +00:00
parent 0762d6c0a7
commit 7113922b20
6 changed files with 8 additions and 1 deletions

View File

@ -121,6 +121,7 @@ public:
GNUEABIHF,
GNUX32,
EABI,
EABIHF,
MachO,
Android,
ELF

View File

@ -150,6 +150,7 @@ const char *Triple::getEnvironmentTypeName(EnvironmentType Kind) {
case GNUEABI: return "gnueabi";
case GNUX32: return "gnux32";
case EABI: return "eabi";
case EABIHF: return "eabihf";
case MachO: return "macho";
case Android: return "android";
case ELF: return "elf";
@ -297,6 +298,7 @@ static Triple::OSType parseOS(StringRef OSName) {
static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
return StringSwitch<Triple::EnvironmentType>(EnvironmentName)
.StartsWith("eabihf", Triple::EABIHF)
.StartsWith("eabi", Triple::EABI)
.StartsWith("gnueabihf", Triple::GNUEABIHF)
.StartsWith("gnueabi", Triple::GNUEABI)

View File

@ -192,6 +192,7 @@ void ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
switch (TargetTriple.getEnvironment()) {
case Triple::Android:
case Triple::EABI:
case Triple::EABIHF:
case Triple::GNUEABI:
case Triple::GNUEABIHF:
TargetABI = ARM_ABI_AAPCS;

View File

@ -317,7 +317,8 @@ public:
// even for GNUEABI, so we can make a distinction here and still conform to
// the EABI on GNU (and Android) mode. This requires change in Clang, too.
bool isTargetAEABI() const {
return TargetTriple.getEnvironment() == Triple::EABI;
return TargetTriple.getEnvironment() == Triple::EABI ||
TargetTriple.getEnvironment() == Triple::EABIHF;
}
bool isAPCS_ABI() const { return TargetABI == ARM_ABI_APCS; }

View File

@ -1,4 +1,5 @@
; RUN: llc -mtriple armv7-none-eabi %s -o - | FileCheck %s --check-prefix=EABI
; RUN: llc -mtriple armv7-none-eabihf %s -o - | FileCheck %s --check-prefix=EABI
; RUN: llc -mtriple armv7-linux-gnueabi %s -o - | FileCheck %s --check-prefix=GNU
; RUN: llc -mtriple armv7-apple-darwin %s -o - | FileCheck %s --check-prefix=DARWIN

View File

@ -1,6 +1,7 @@
; RUN: llc < %s -mtriple=armv7-apple-ios -o - | FileCheck %s
; RUN: llc < %s -mtriple=thumbv7m-darwin-eabi -o - | FileCheck %s --check-prefix=DARWIN
; RUN: llc < %s -mtriple=arm-none-eabi -o - | FileCheck --check-prefix=EABI %s
; RUN: llc < %s -mtriple=arm-none-eabihf -o - | FileCheck --check-prefix=EABI %s
@from = common global [500 x i32] zeroinitializer, align 4
@to = common global [500 x i32] zeroinitializer, align 4