[llvm-commits] [llvm-gcc-4.2] r118233 - in /llvm-gcc-4.2/trunk/gcc/config/arm: arm.c arm.h

Eric Christopher echristo at apple.com
Wed Nov 3 19:15:22 PDT 2010


Author: echristo
Date: Wed Nov  3 21:15:22 2010
New Revision: 118233

URL: http://llvm.org/viewvc/llvm-project?rev=118233&view=rev
Log:
Use the arch to set the architecture, not the mtune value.

Fixes rdar://8516205.


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=118233&r1=118232&r2=118233&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/arm.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.c Wed Nov  3 21:15:22 2010
@@ -551,6 +551,9 @@
 /* The processor for which instructions should be scheduled.  */
 enum processor_type arm_tune = arm_none;
 
+/* LLVM LOCAL global arch value */
+enum processor_type target_arch_cpu = arm_none;
+
 /* APPLE LOCAL begin v7 support. Merge from mainline */
 /* The default processor used if not overriden by commandline.  */
 static enum processor_type arm_default_cpu = arm_none;
@@ -1289,12 +1292,13 @@
   unsigned i;
 /* APPLE LOCAL v7 support. Merge from Codesourcery */
   int len;
-  enum processor_type target_arch_cpu = arm_none;
+  /* LLVM LOCAL global arch value */
+  /* Moved target_arch_cpu to arm.h */
 
   /* Set up the flags based on the cpu/architecture selected by the user.  */
   for (i = ARRAY_SIZE (arm_select); i--;)
     {
-      struct arm_cpu_select * ptr = arm_select + i;
+      struct arm_cpu_select * ptr = &arm_select[i];
 
       if (ptr->string != NULL && ptr->string[0] != '\0')
         {

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=118233&r1=118232&r2=118233&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/arm.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.h Wed Nov  3 21:15:22 2010
@@ -149,6 +149,9 @@
 /* The processor for which instructions should be scheduled.  */
 extern enum processor_type arm_tune;
 
+/* LLVM LOCAL global arch value */
+extern enum processor_type target_arch_cpu;
+
 typedef enum arm_cond_code
 {
   ARM_EQ = 0, ARM_NE, ARM_CS, ARM_CC, ARM_MI, ARM_PL, ARM_VS, ARM_VC,
@@ -3456,7 +3459,7 @@
 /* Turn -march=xx into a CPU type.
  */
 #define LLVM_SET_SUBTARGET_FEATURES(F) \
-  { switch (arm_tune) { \
+  { switch (target_arch_cpu) { \
     case arm8:          F.setCPU("arm8"); break;\
     case arm810:        F.setCPU("arm810"); break;\
     case strongarm:     F.setCPU("strongarm"); break;\





More information about the llvm-commits mailing list