r219933 - [AArch64] Enable A53 erratum workaround (835769) by default for Android targets

Bradley Smith bradley.smith at arm.com
Thu Oct 16 09:35:15 PDT 2014


Author: brasmi01
Date: Thu Oct 16 11:35:14 2014
New Revision: 219933

URL: http://llvm.org/viewvc/llvm-project?rev=219933&view=rev
Log:
[AArch64] Enable A53 erratum workaround (835769) by default for Android targets

Added:
    cfe/trunk/test/CodeGen/aarch64-fix-cortex-a53-835769.c   (with props)
Removed:
    cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769-cg.c
Modified:
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769.c

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=219933&r1=219932&r2=219933&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Oct 16 11:35:14 2014
@@ -920,6 +920,10 @@ void Clang::AddAArch64TargetArgs(const A
       CmdArgs.push_back("-aarch64-fix-cortex-a53-835769=1");
     else
       CmdArgs.push_back("-aarch64-fix-cortex-a53-835769=0");
+  } else if (Triple.getEnvironment() == llvm::Triple::Android) {
+    // Enabled A53 errata (835769) workaround by default on android
+    CmdArgs.push_back("-backend-option");
+    CmdArgs.push_back("-aarch64-fix-cortex-a53-835769=1");
   }
 
   // Setting -mno-global-merge disables the codegen global merge pass. Setting

Added: cfe/trunk/test/CodeGen/aarch64-fix-cortex-a53-835769.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/aarch64-fix-cortex-a53-835769.c?rev=219933&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/aarch64-fix-cortex-a53-835769.c (added)
+++ cfe/trunk/test/CodeGen/aarch64-fix-cortex-a53-835769.c Thu Oct 16 11:35:14 2014
@@ -0,0 +1,27 @@
+// REQUIRES: aarch64-registered-target
+
+// RUN: %clang -O3 -target aarch64-linux-eabi %s -S -o- \
+// RUN:   | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
+// RUN: %clang -O3 -target aarch64-linux-eabi -mfix-cortex-a53-835769 %s -S -o- 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
+// RUN: %clang -O3 -target aarch64-linux-eabi -mno-fix-cortex-a53-835769 %s -S -o- 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
+
+// RUN: %clang -O3 -target aarch64-android-eabi %s -S -o- \
+// RUN:   | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
+// RUN: %clang -O3 -target aarch64-android-eabi -mfix-cortex-a53-835769 %s -S -o- \
+// RUN:   | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
+// RUN: %clang -O3 -target aarch64-android-eabi -mno-fix-cortex-a53-835769 %s -S -o- \
+// RUN:   | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
+
+typedef long int64_t;
+
+int64_t f_load_madd_64(int64_t a, int64_t b, int64_t *c) {
+    int64_t result = a+b*(*c);
+    return result;
+}
+
+// CHECK: ldr
+// CHECK-YES-NEXT: nop
+// CHECK-NO-NEXT-NOT: nop
+// CHECK-NEXT: madd

Propchange: cfe/trunk/test/CodeGen/aarch64-fix-cortex-a53-835769.c
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cfe/trunk/test/CodeGen/aarch64-fix-cortex-a53-835769.c
------------------------------------------------------------------------------
    svn:keywords = Rev Date Author URL Id

Removed: cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769-cg.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769-cg.c?rev=219932&view=auto
==============================================================================
--- cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769-cg.c (original)
+++ cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769-cg.c (removed)
@@ -1,19 +0,0 @@
-// REQUIRES: aarch64-registered-target
-// RUN: %clang -O3 -target aarch64-linux-eabi %s -S -o- \
-// RUN:   | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
-// RUN: %clang -O3 -target aarch64-linux-eabi -mfix-cortex-a53-835769 %s -S -o- 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
-// RUN: %clang -O3 -target aarch64-linux-eabi -mno-fix-cortex-a53-835769 %s -S -o- 2>&1 \
-// RUN:   | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
-
-typedef long int64_t;
-
-int64_t f_load_madd_64(int64_t a, int64_t b, int64_t *c) {
-    int64_t result = a+b*(*c);
-    return result;
-}
-
-// CHECK: ldr
-// CHECK-YES-NEXT: nop
-// CHECK-NO-NEXT-NOT: nop
-// CHECK-NEXT: madd

Modified: cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769.c?rev=219933&r1=219932&r2=219933&view=diff
==============================================================================
--- cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769.c (original)
+++ cfe/trunk/test/Driver/aarch64-fix-cortex-a53-835769.c Thu Oct 16 11:35:14 2014
@@ -4,6 +4,10 @@
 // RUN:   | FileCheck --check-prefix=CHECK-YES %s
 // RUN: %clang -target aarch64-linux-eabi -mno-fix-cortex-a53-835769 %s -### 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-NO %s
+
+// RUN: %clang -target aarch64-android-eabi %s -### 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-YES %s
+
 // CHECK-DEF-NOT: "-backend-option" "-aarch64-fix-cortex-a53-835769"
 // CHECK-YES: "-backend-option" "-aarch64-fix-cortex-a53-835769=1"
 // CHECK-NO: "-backend-option" "-aarch64-fix-cortex-a53-835769=0"





More information about the cfe-commits mailing list