[PATCH] D69012: [Headers] Fix compatibility between arm_acle.h and intrin.h

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 29 17:45:16 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rG98286b569d01: [Headers] Fix compatibility between arm_acle.h and intrin.h (authored by efriedma).

Changed prior to commit:
  https://reviews.llvm.org/D69012?vs=225130&id=226999#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69012

Files:
  clang/lib/Headers/arm_acle.h
  clang/test/Headers/arm-acle-header.c


Index: clang/test/Headers/arm-acle-header.c
===================================================================
--- clang/test/Headers/arm-acle-header.c
+++ clang/test/Headers/arm-acle-header.c
@@ -4,6 +4,12 @@
 // RUN: %clang_cc1 -x c++ -triple armv7-eabi -target-cpu cortex-a15 -fsyntax-only -ffreestanding %s
 // RUN: %clang_cc1 -x c++ -triple aarch64-eabi -target-cpu cortex-a57 -fsyntax-only -ffreestanding %s
 // RUN: %clang_cc1 -x c++ -triple thumbv7-windows -target-cpu cortex-a15 -fsyntax-only -ffreestanding %s
+// RUN: %clang_cc1 -x c++ -triple thumbv7-windows -target-cpu cortex-a15 -fsyntax-only -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=19.11 %s
+// RUN: %clang_cc1 -x c++ -triple aarch64-windows -target-cpu cortex-a53 -fsyntax-only -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=19.11 %s
 // expected-no-diagnostics
 
 #include <arm_acle.h>
+#ifdef _MSC_VER
+#include <intrin.h>
+#endif
+void f() { __nop(); __dmb(0); __wfi(); }
Index: clang/lib/Headers/arm_acle.h
===================================================================
--- clang/lib/Headers/arm_acle.h
+++ clang/lib/Headers/arm_acle.h
@@ -90,9 +90,11 @@
 #endif
 
 /* 8.7 NOP */
+#if !defined(_MSC_VER) || !defined(__aarch64__)
 static __inline__ void __attribute__((__always_inline__, __nodebug__)) __nop(void) {
   __builtin_arm_nop();
 }
+#endif
 
 /* 9 DATA-PROCESSING INTRINSICS */
 /* 9.2 Miscellaneous data-processing intrinsics */


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69012.226999.patch
Type: text/x-patch
Size: 1484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191030/9dfdbfda/attachment.bin>


More information about the cfe-commits mailing list