This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4981a186b3aa: [Driver][Fuchsia] Make -mfix-cortex-a53-835769 
default when targeting Fuchsia (authored by abrachet).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136703/new/

https://reviews.llvm.org/D136703

Files:
  clang/lib/Driver/ToolChains/Arch/AArch64.cpp
  clang/test/Driver/aarch64-fix-cortex-a53-835769.c


Index: clang/test/Driver/aarch64-fix-cortex-a53-835769.c
===================================================================
--- clang/test/Driver/aarch64-fix-cortex-a53-835769.c
+++ clang/test/Driver/aarch64-fix-cortex-a53-835769.c
@@ -8,6 +8,12 @@
 // RUN: %clang -target aarch64-android-eabi %s -### 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-YES %s
 
+// RUN: %clang --target=aarch64-fuchsia %s -### 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-YES %s
+
+// RUN: %clang --target=aarch64-fuchsia -mcpu=cortex-a73 %s -### 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-DEF %s
+
 // CHECK-DEF-NOT: "{[+-]}fix-cortex-a53-835769"
 // CHECK-YES: "+fix-cortex-a53-835769"
 // CHECK-NO: "-fix-cortex-a53-835769"
Index: clang/lib/Driver/ToolChains/Arch/AArch64.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Arch/AArch64.cpp
+++ clang/lib/Driver/ToolChains/Arch/AArch64.cpp
@@ -7,6 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #include "AArch64.h"
+#include "../CommonArgs.h"
 #include "clang/Driver/Driver.h"
 #include "clang/Driver/DriverDiagnostic.h"
 #include "clang/Driver/Options.h"
@@ -615,6 +616,10 @@
   } else if (Triple.isAndroid()) {
     // Enabled A53 errata (835769) workaround by default on android
     Features.push_back("+fix-cortex-a53-835769");
+  } else if (Triple.isOSFuchsia()) {
+    std::string CPU = getCPUName(D, Args, Triple);
+    if (CPU.empty() || CPU == "generic" || CPU == "cortex-a53")
+      Features.push_back("+fix-cortex-a53-835769");
   }
 
   if (Args.getLastArg(options::OPT_mno_bti_at_return_twice))


Index: clang/test/Driver/aarch64-fix-cortex-a53-835769.c
===================================================================
--- clang/test/Driver/aarch64-fix-cortex-a53-835769.c
+++ clang/test/Driver/aarch64-fix-cortex-a53-835769.c
@@ -8,6 +8,12 @@
 // RUN: %clang -target aarch64-android-eabi %s -### 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-YES %s
 
+// RUN: %clang --target=aarch64-fuchsia %s -### 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-YES %s
+
+// RUN: %clang --target=aarch64-fuchsia -mcpu=cortex-a73 %s -### 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-DEF %s
+
 // CHECK-DEF-NOT: "{[+-]}fix-cortex-a53-835769"
 // CHECK-YES: "+fix-cortex-a53-835769"
 // CHECK-NO: "-fix-cortex-a53-835769"
Index: clang/lib/Driver/ToolChains/Arch/AArch64.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Arch/AArch64.cpp
+++ clang/lib/Driver/ToolChains/Arch/AArch64.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "AArch64.h"
+#include "../CommonArgs.h"
 #include "clang/Driver/Driver.h"
 #include "clang/Driver/DriverDiagnostic.h"
 #include "clang/Driver/Options.h"
@@ -615,6 +616,10 @@
   } else if (Triple.isAndroid()) {
     // Enabled A53 errata (835769) workaround by default on android
     Features.push_back("+fix-cortex-a53-835769");
+  } else if (Triple.isOSFuchsia()) {
+    std::string CPU = getCPUName(D, Args, Triple);
+    if (CPU.empty() || CPU == "generic" || CPU == "cortex-a53")
+      Features.push_back("+fix-cortex-a53-835769");
   }
 
   if (Args.getLastArg(options::OPT_mno_bti_at_return_twice))
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to