[clang] [MSVC, ARM64] Fix signature for __prefetch (PR #93235)

2024-05-24 Thread Daniel Paoliello via cfe-commits

https://github.com/dpaoliello closed 
https://github.com/llvm/llvm-project/pull/93235
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [MSVC, ARM64] Fix signature for __prefetch (PR #93235)

2024-05-23 Thread Daniel Paoliello via cfe-commits

https://github.com/dpaoliello created 
https://github.com/llvm/llvm-project/pull/93235

#67174 added the `__prefetch` intrinsic, however it used the wrong signature: 
the argument should be `const void*`, not `void*`.

Docs: 
https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics?view=msvc-170#:~:text=__prefetch

Unfortunately, this can't be backported (there are no more 18.x releases, and 
this change is a breaking change), so I'll see if I can get a workaround added 
on MSVC's side for Clang 18.

>From 97d449824f7ce9c2f1501e3f51468950c4114d13 Mon Sep 17 00:00:00 2001
From: Daniel Paoliello 
Date: Thu, 23 May 2024 12:48:13 -0700
Subject: [PATCH] Fix signature for __prefetch

---
 clang/include/clang/Basic/BuiltinsAArch64.def | 2 +-
 clang/lib/Headers/intrin.h| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/include/clang/Basic/BuiltinsAArch64.def 
b/clang/include/clang/Basic/BuiltinsAArch64.def
index cf8711c6eaee3..5f53c98167dfb 100644
--- a/clang/include/clang/Basic/BuiltinsAArch64.def
+++ b/clang/include/clang/Basic/BuiltinsAArch64.def
@@ -290,7 +290,7 @@ TARGET_HEADER_BUILTIN(_CountLeadingZeros64, "UiULLi", "nh", 
INTRIN_H, ALL_MS_LAN
 TARGET_HEADER_BUILTIN(_CountOneBits, "UiUNi", "nh", INTRIN_H, 
ALL_MS_LANGUAGES, "")
 TARGET_HEADER_BUILTIN(_CountOneBits64, "UiULLi", "nh", INTRIN_H, 
ALL_MS_LANGUAGES, "")
 
-TARGET_HEADER_BUILTIN(__prefetch, "vv*", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
+TARGET_HEADER_BUILTIN(__prefetch, "vvC*", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
 
 #undef BUILTIN
 #undef LANGBUILTIN
diff --git a/clang/lib/Headers/intrin.h b/clang/lib/Headers/intrin.h
index 7eb6dceaabfae..5ceb986a1f652 100644
--- a/clang/lib/Headers/intrin.h
+++ b/clang/lib/Headers/intrin.h
@@ -378,7 +378,7 @@ unsigned int _CountLeadingSigns64(__int64);
 unsigned int _CountOneBits(unsigned long);
 unsigned int _CountOneBits64(unsigned __int64);
 
-void __cdecl __prefetch(void *);
+void __cdecl __prefetch(const void *);
 #endif
 
 
/**\

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


[clang] [Arm64EC] Fix compilation of arm_acle.h (PR #91281)

2024-05-06 Thread Daniel Paoliello via cfe-commits

https://github.com/dpaoliello approved this pull request.


https://github.com/llvm/llvm-project/pull/91281
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [ARM64EC] Add softintrin.lib as an implicit dependency to object files. (PR #89171)

2024-04-18 Thread Daniel Paoliello via cfe-commits

https://github.com/dpaoliello approved this pull request.

Did the exact same thing for Rust :)

https://github.com/llvm/llvm-project/pull/89171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [ARM64EC] Fix arm_neon.h on ARM64EC. (PR #88572)

2024-04-12 Thread Daniel Paoliello via cfe-commits

https://github.com/dpaoliello approved this pull request.


https://github.com/llvm/llvm-project/pull/88572
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[llvm] [clang] Arm64EC entry/exit thunks, consolidated. (PR #79067)

2024-01-22 Thread Daniel Paoliello via cfe-commits

https://github.com/dpaoliello approved this pull request.


https://github.com/llvm/llvm-project/pull/79067
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits