[PATCH] D52493: [AArch64][v8.5A] Test clang option for the Memory Tagging Extension

Oliver Stannard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 25 07:19:33 PDT 2018


olista01 created this revision.
Herald added a reviewer: javed.absar.
Herald added subscribers: cfe-commits, kristof.beyls.

The implementation of this is in TargetParser, so we only need to add a
test for it in clang.

Patch by Pablo Barrio!


Repository:
  rC Clang

https://reviews.llvm.org/D52493

Files:
  test/Driver/aarch64-mte.c


Index: test/Driver/aarch64-mte.c
===================================================================
--- /dev/null
+++ test/Driver/aarch64-mte.c
@@ -0,0 +1,13 @@
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a+memtag %s 2>&1 | FileCheck %s
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a+memtag %s 2>&1 | FileCheck %s
+// CHECK: "-target-feature" "+mte"
+
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a+nomemtag %s 2>&1 | FileCheck %s --check-prefix=NOMTE
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a+nomemtag %s 2>&1 | FileCheck %s --check-prefix=NOMTE
+// NOMTE: "-target-feature" "-mte"
+
+// RUN: %clang -### -target aarch64-none-none-eabi                 %s 2>&1 | FileCheck %s --check-prefix=ABSENTMTE
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a %s 2>&1 | FileCheck %s --check-prefix=ABSENTMTE
+// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a %s 2>&1 | FileCheck %s --check-prefix=ABSENTMTE
+// ABSENTMTE-NOT: "-target-feature" "+mte"
+// ABSENTMTE-NOT: "-target-feature" "-mte"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52493.166910.patch
Type: text/x-patch
Size: 1112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180925/0550f437/attachment.bin>


More information about the cfe-commits mailing list