mgrang created this revision. mgrang added reviewers: rnk, efriedma, TomTan, haripul, ssijaric. Herald added subscribers: kristof.beyls, javed.absar.
Repository: rC Clang https://reviews.llvm.org/D56671 Files: lib/Headers/intrin.h test/Headers/ms-arm64-intrin.cpp Index: test/Headers/ms-arm64-intrin.cpp =================================================================== --- /dev/null +++ test/Headers/ms-arm64-intrin.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple arm64-windows \ +// RUN: -fms-compatibility -fms-compatibility-version=17.00 \ +// RUN: -ffreestanding -fsyntax-only -Werror \ +// RUN: -isystem %S/Inputs/include %s -S -o - 2>&1 | FileCheck %s + +// REQUIRES: aarch64-registered-target + +#include <intrin.h> + +void f() { +// CHECK: nop + __nop(); +} Index: lib/Headers/intrin.h =================================================================== --- lib/Headers/intrin.h +++ lib/Headers/intrin.h @@ -549,6 +549,9 @@ __halt(void) { __asm__ volatile ("hlt"); } +#endif + +#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) static __inline__ void __DEFAULT_FN_ATTRS __nop(void) { __asm__ volatile ("nop");
Index: test/Headers/ms-arm64-intrin.cpp =================================================================== --- /dev/null +++ test/Headers/ms-arm64-intrin.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple arm64-windows \ +// RUN: -fms-compatibility -fms-compatibility-version=17.00 \ +// RUN: -ffreestanding -fsyntax-only -Werror \ +// RUN: -isystem %S/Inputs/include %s -S -o - 2>&1 | FileCheck %s + +// REQUIRES: aarch64-registered-target + +#include <intrin.h> + +void f() { +// CHECK: nop + __nop(); +} Index: lib/Headers/intrin.h =================================================================== --- lib/Headers/intrin.h +++ lib/Headers/intrin.h @@ -549,6 +549,9 @@ __halt(void) { __asm__ volatile ("hlt"); } +#endif + +#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) static __inline__ void __DEFAULT_FN_ATTRS __nop(void) { __asm__ volatile ("nop");
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits