[llvm-commits] [llvm-gcc-4.2] r76673 - in /llvm-gcc-4.2/trunk/gcc/config/arm: arm.c arm.h
Evan Cheng
evan.cheng at apple.com
Tue Jul 21 16:15:18 PDT 2009
Author: evancheng
Date: Tue Jul 21 18:15:18 2009
New Revision: 76673
URL: http://llvm.org/viewvc/llvm-project?rev=76673&view=rev
Log:
Translate -march=armv7a to the right llvm triplet.
Modified:
llvm-gcc-4.2/trunk/gcc/config/arm/arm.c
llvm-gcc-4.2/trunk/gcc/config/arm/arm.h
Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.c?rev=76673&r1=76672&r2=76673&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/arm.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.c Tue Jul 21 18:15:18 2009
@@ -596,6 +596,9 @@
/* Nonzero if this chip supports the ARM 6K extensions. */
int arm_arch6k = 0;
+/* Nonzero if this chip supports the ARM 7A extensions. */
+int arm_arch7a = 0;
+
/* Nonzero if this chip can benefit from load scheduling. */
int arm_ld_sched = 0;
@@ -1385,6 +1388,7 @@
arm_arch5e = (insn_flags & FL_ARCH5E) != 0;
arm_arch6 = (insn_flags & FL_ARCH6) != 0;
arm_arch6k = (insn_flags & FL_ARCH6K) != 0;
+ arm_arch7a = (insn_flags & FL_FOR_ARCH7A) == FL_FOR_ARCH7A;
/* LLVM LOCAL begin */
arm_arch_thumb2 = (insn_flags & FL_THUMB2) != 0;
/* LLVM LOCAL end */
Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.h?rev=76673&r1=76672&r2=76673&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/arm.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.h Tue Jul 21 18:15:18 2009
@@ -363,6 +363,9 @@
/* Nonzero if this chip supports the ARM Architecture 6 extensions. */
extern int arm_arch6;
+/* LLVM LOCAL Declare arm_arch7a for use when setting the target triple. */
+extern int arm_arch7a;
+
/* Nonzero if this chip can benefit from load scheduling. */
extern int arm_ld_sched;
@@ -3023,20 +3026,32 @@
* armv6-apple-darwin, thumbv5-apple-darwin. FIXME: Replace thumb triplets
* with function notes.
*/
-#define LLVM_OVERRIDE_TARGET_ARCH() \
- (TARGET_THUMB \
- ? (arm_arch_thumb2 \
- ? "thumbv6t2" : \
- (arm_arch6 \
- ? "thumbv6" : (arm_arch5e \
- ? "thumbv5e" : (arm_arch5 \
- ? "thumbv5" : (arm_arch4t \
- ? "thumbv4t" : ""))))) \
- : (arm_arch6 \
- ? "armv6" : (arm_arch5e \
- ? "armv5e" : (arm_arch5 \
- ? "armv5" : (arm_arch4t \
- ? "armv4t" : "")))))
+#define LLVM_OVERRIDE_TARGET_ARCH() \
+ (TARGET_THUMB \
+ ? (arm_arch7a \
+ ? "thumbv7" \
+ : (arm_arch_thumb2 \
+ ? "thumbv6t2" \
+ : (arm_arch6 \
+ ? "thumbv6" \
+ : (arm_arch5e \
+ ? "thumbv5e" \
+ : (arm_arch5 \
+ ? "thumbv5" \
+ : (arm_arch4t \
+ ? "thumbv4t" : "")))))) \
+ : (arm_arch7a \
+ ? "armv7" \
+ : (arm_arch_thumb2 \
+ ? "armv6t2" \
+ : (arm_arch6 \
+ ? "armv6" \
+ : (arm_arch5e \
+ ? "armv5e" \
+ : (arm_arch5 \
+ ? "armv5" \
+ : (arm_arch4t \
+ ? "armv4t" : "")))))))
#define LLVM_SET_MACHINE_OPTIONS(argvec) \
if (TARGET_SOFT_FLOAT) \
More information about the llvm-commits
mailing list