[PATCH] D25928: [cfi] Enable cfi-icall on ARM and AArch64.

2016-11-28 Thread Evgeniy Stepanov via Phabricator via cfe-commits
eugenis closed this revision.
eugenis added a comment.

Committed in r286613


Repository:
  rL LLVM

https://reviews.llvm.org/D25928



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25928: [cfi] Enable cfi-icall on ARM and AArch64.

2016-10-25 Thread Stephen Hines via cfe-commits
srhines accepted this revision.
srhines added a reviewer: srhines.
srhines added a comment.
This revision is now accepted and ready to land.

Looks good for the Android side.


Repository:
  rL LLVM

https://reviews.llvm.org/D25928



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25928: [cfi] Enable cfi-icall on ARM and AArch64.

2016-10-24 Thread Evgeniy Stepanov via cfe-commits
eugenis created this revision.
eugenis added a reviewer: pcc.
eugenis added a subscriber: cfe-commits.
eugenis set the repository for this revision to rL LLVM.
Herald added subscribers: srhines, danalbert, tberghammer, rengolin, aemerson.

Backend support added in https://reviews.llvm.org/D25927


Repository:
  rL LLVM

https://reviews.llvm.org/D25928

Files:
  lib/Driver/ToolChain.cpp
  test/Driver/fsanitize.c


Index: test/Driver/fsanitize.c
===
--- test/Driver/fsanitize.c
+++ test/Driver/fsanitize.c
@@ -328,6 +328,10 @@
 // RUN: %clang -target x86_64-linux-gnu -fvisibility=hidden 
-fsanitize=cfi-unrelated-cast -flto -c %s -### 2>&1 | FileCheck %s 
--check-prefix=CHECK-CFI-UCAST
 // RUN: %clang -target x86_64-linux-gnu -flto -fvisibility=hidden 
-fsanitize=cfi-nvcall -c %s -### 2>&1 | FileCheck %s 
--check-prefix=CHECK-CFI-NVCALL
 // RUN: %clang -target x86_64-linux-gnu -flto -fvisibility=hidden 
-fsanitize=cfi-vcall -c %s -### 2>&1 | FileCheck %s 
--check-prefix=CHECK-CFI-VCALL
+// RUN: %clang -target arm-linux-gnu -fvisibility=hidden -fsanitize=cfi -flto 
-c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI
+// RUN: %clang -target aarch64-linux-gnu -fvisibility=hidden -fsanitize=cfi 
-flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI
+// RUN: %clang -target arm-linux-android -fvisibility=hidden -fsanitize=cfi 
-flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI
+// RUN: %clang -target aarch64-linux-android -fvisibility=hidden 
-fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI
 // CHECK-CFI: 
-emit-llvm-bc{{.*}}-fsanitize=cfi-derived-cast,cfi-icall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall
 // CHECK-CFI-DCAST: -emit-llvm-bc{{.*}}-fsanitize=cfi-derived-cast
 // CHECK-CFI-UCAST: -emit-llvm-bc{{.*}}-fsanitize=cfi-unrelated-cast
Index: lib/Driver/ToolChain.cpp
===
--- lib/Driver/ToolChain.cpp
+++ lib/Driver/ToolChain.cpp
@@ -698,6 +698,8 @@
   CFICastStrict | UnsignedIntegerOverflow | LocalBounds;
   if (getTriple().getArch() == llvm::Triple::x86 ||
   getTriple().getArch() == llvm::Triple::x86_64 ||
+  getTriple().getArch() == llvm::Triple::arm ||
+  getTriple().getArch() == llvm::Triple::aarch64 ||
   getTriple().getArch() == llvm::Triple::wasm32 ||
   getTriple().getArch() == llvm::Triple::wasm64)
 Res |= CFIICall;


Index: test/Driver/fsanitize.c
===
--- test/Driver/fsanitize.c
+++ test/Driver/fsanitize.c
@@ -328,6 +328,10 @@
 // RUN: %clang -target x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi-unrelated-cast -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-UCAST
 // RUN: %clang -target x86_64-linux-gnu -flto -fvisibility=hidden -fsanitize=cfi-nvcall -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NVCALL
 // RUN: %clang -target x86_64-linux-gnu -flto -fvisibility=hidden -fsanitize=cfi-vcall -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-VCALL
+// RUN: %clang -target arm-linux-gnu -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI
+// RUN: %clang -target aarch64-linux-gnu -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI
+// RUN: %clang -target arm-linux-android -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI
+// RUN: %clang -target aarch64-linux-android -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI
 // CHECK-CFI: -emit-llvm-bc{{.*}}-fsanitize=cfi-derived-cast,cfi-icall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall
 // CHECK-CFI-DCAST: -emit-llvm-bc{{.*}}-fsanitize=cfi-derived-cast
 // CHECK-CFI-UCAST: -emit-llvm-bc{{.*}}-fsanitize=cfi-unrelated-cast
Index: lib/Driver/ToolChain.cpp
===
--- lib/Driver/ToolChain.cpp
+++ lib/Driver/ToolChain.cpp
@@ -698,6 +698,8 @@
   CFICastStrict | UnsignedIntegerOverflow | LocalBounds;
   if (getTriple().getArch() == llvm::Triple::x86 ||
   getTriple().getArch() == llvm::Triple::x86_64 ||
+  getTriple().getArch() == llvm::Triple::arm ||
+  getTriple().getArch() == llvm::Triple::aarch64 ||
   getTriple().getArch() == llvm::Triple::wasm32 ||
   getTriple().getArch() == llvm::Triple::wasm64)
 Res |= CFIICall;
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits