[llvm] r197405 - Recognize EABIHF as environment and use it for RTAPI + VFP.

Joerg Sonnenberger joerg at bec.de
Mon Dec 16 10:51:29 PST 2013


Author: joerg
Date: Mon Dec 16 12:51:28 2013
New Revision: 197405

URL: http://llvm.org/viewvc/llvm-project?rev=197405&view=rev
Log:
Recognize EABIHF as environment and use it for RTAPI + VFP.

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

Modified: llvm/trunk/include/llvm/ADT/Triple.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=197405&r1=197404&r2=197405&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Triple.h (original)
+++ llvm/trunk/include/llvm/ADT/Triple.h Mon Dec 16 12:51:28 2013
@@ -121,6 +121,7 @@ public:
     GNUEABIHF,
     GNUX32,
     EABI,
+    EABIHF,
     MachO,
     Android,
     ELF

Modified: llvm/trunk/lib/Support/Triple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=197405&r1=197404&r2=197405&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Triple.cpp (original)
+++ llvm/trunk/lib/Support/Triple.cpp Mon Dec 16 12:51:28 2013
@@ -150,6 +150,7 @@ const char *Triple::getEnvironmentTypeNa
   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
 
 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)

Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=197405&r1=197404&r2=197405&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp Mon Dec 16 12:51:28 2013
@@ -192,6 +192,7 @@ void ARMSubtarget::resetSubtargetFeature
   switch (TargetTriple.getEnvironment()) {
   case Triple::Android:
   case Triple::EABI:
+  case Triple::EABIHF:
   case Triple::GNUEABI:
   case Triple::GNUEABIHF:
     TargetABI = ARM_ABI_AAPCS;

Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.h?rev=197405&r1=197404&r2=197405&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.h Mon Dec 16 12:51:28 2013
@@ -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; }

Modified: llvm/trunk/test/CodeGen/ARM/divmod-eabi.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/divmod-eabi.ll?rev=197405&r1=197404&r2=197405&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/divmod-eabi.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/divmod-eabi.ll Mon Dec 16 12:51:28 2013
@@ -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
 

Modified: llvm/trunk/test/CodeGen/ARM/memfunc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/memfunc.ll?rev=197405&r1=197404&r2=197405&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/memfunc.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/memfunc.ll Mon Dec 16 12:51:28 2013
@@ -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





More information about the llvm-commits mailing list