[compiler-rt] [compiler-rt] Add initial ARM64EC builtins support (PR #139279)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Wed May 14 02:01:02 PDT 2025


================
@@ -122,7 +123,7 @@ void __clear_cache(void *start, void *end) {
     compilerrt_abort();
 #endif
   }
-#elif defined(__aarch64__) && !defined(__APPLE__)
+#elif (defined(__aarch64__) || defined(__arm64ec__)) && !defined(__APPLE__)
----------------
mstorsjo wrote:

Isn't this case redundant here - isn't this `#elif` on the same level as the `_WIN32 && (arm || aarch64 || arm64ec)` at the start of the function?

On the other hand, it's probably ok on one sense, as I guess this implementation should be usable too - or is it? I'm not entirely sure if this uses some instruction which is not accessible from userspace on Windows (which could be why we're using `FlushInstructionCache` to being with). Or perhaps that was required for 32 bit arm and we just kept doing the same for 64 bit too?

https://github.com/llvm/llvm-project/pull/139279


More information about the llvm-commits mailing list