Author: Eli Friedman
Date: 2024-05-06T20:04:55-07:00
New Revision: 4cce9fbb4e086170f69bfc8766f9613673b441c9

URL: 
https://github.com/llvm/llvm-project/commit/4cce9fbb4e086170f69bfc8766f9613673b441c9
DIFF: 
https://github.com/llvm/llvm-project/commit/4cce9fbb4e086170f69bfc8766f9613673b441c9.diff

LOG: [Arm64EC] Fix compilation of arm_acle.h (#91281)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/arm_acle.h b/clang/lib/Headers/arm_acle.h
index 6e557eda1dddca..5785954c9171ab 100644
--- a/clang/lib/Headers/arm_acle.h
+++ b/clang/lib/Headers/arm_acle.h
@@ -109,7 +109,7 @@ __swp(uint32_t __x, volatile uint32_t *__p) {
 #endif
 
 /* 7.7 NOP */
-#if !defined(_MSC_VER) || !defined(__aarch64__)
+#if !defined(_MSC_VER) || (!defined(__aarch64__) && !defined(__arm64ec__))
 static __inline__ void __attribute__((__always_inline__, __nodebug__)) 
__nop(void) {
   __builtin_arm_nop();
 }

diff  --git a/clang/test/Headers/arm-acle-header.c 
b/clang/test/Headers/arm-acle-header.c
index f04c7e1f0f35f7..fea8472183c871 100644
--- a/clang/test/Headers/arm-acle-header.c
+++ b/clang/test/Headers/arm-acle-header.c
@@ -7,6 +7,7 @@
 // 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
 // RUN: %clang_cc1 -x c++ -triple arm64-apple-ios -target-cpu apple-a7 
-fsyntax-only -ffreestanding -fms-extensions %s
+// RUN: %clang_cc1 -x c++ -triple arm64ec-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>


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

Reply via email to