[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:03 PDT 2025


================
@@ -31,22 +44,28 @@ int main()
 {
 #if defined(__ve__)
     unsigned char execution_buffer[128] __attribute__((__aligned__(8)));
+#elif defined(__x86_64__)
+  unsigned char execution_buffer[sizeof(func1)];
 #else
     unsigned char execution_buffer[128];
 #endif
     // mark stack page containing execution_buffer to be executable
     __enable_execute_stack(execution_buffer);
 	
     // verify you can copy and execute a function
-    pfunc f1 = (pfunc)memcpy_f(execution_buffer, func1, 128);
-    __clear_cache(execution_buffer, &execution_buffer[128]);
+    pfunc f1 =
+        (pfunc)memcpy_f(execution_buffer, func1, sizeof(execution_buffer));
----------------
mstorsjo wrote:

Same here - shouldn't overreads here be equally problematic for arm64ec as for all the existing architectures?

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


More information about the llvm-commits mailing list