Recognize EABIHF as environment and use it for RTAPI + VFP.
authorJoerg Sonnenberger <joerg@bec.de>
Mon, 16 Dec 2013 18:51:28 +0000 (18:51 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Mon, 16 Dec 2013 18:51:28 +0000 (18:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197405 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Triple.h
lib/Support/Triple.cpp
lib/Target/ARM/ARMSubtarget.cpp
lib/Target/ARM/ARMSubtarget.h
test/CodeGen/ARM/divmod-eabi.ll
test/CodeGen/ARM/memfunc.ll

index 9b34d8a3da5058d9a693dd8164dd308910986e86..314ee4e3589bd593b77a6d0daf960560d0833f27 100644 (file)
@@ -121,6 +121,7 @@ public:
     GNUEABIHF,
     GNUX32,
     EABI,
+    EABIHF,
     MachO,
     Android,
     ELF
index 20531b15efd784668a09842103393e8658d1914c..273316a0a6f9ca7fc4b673d24c72b5b0b289fdcb 100644 (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)
index a0bf7a63e839a7c49802f68e2f2709e5588c9c4a..3c5bed52b7b16c484c5dda84e615a94c09ee0d4d 100644 (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;
index 45a7a1aaaec6c2419a9ebc0a0ab20daf21b072bb..42bc155d3be9144fa60a7c1e2b625f025c085411 100644 (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; }
index 404cae0da2b2ffde98b1e353d00d1aa1287515d7..64d093e768b5c99e43864df23af43c07e63432eb 100644 (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
 
index fe0056c42a1153da901cba4680bc76bd5dde6df0..a724080b74ca3c60df8bf03f7330ae0118f4747e 100644 (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