[PATCH] D42197: [compiler-rt] [builtins] Use FlushInstructionCache on windows on aarch64 as well

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 23:38:35 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL322928: [builtins] Use FlushInstructionCache on windows on aarch64 as well (authored by mstorsjo, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D42197?vs=130257&id=130563#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42197

Files:
  compiler-rt/trunk/lib/builtins/clear_cache.c


Index: compiler-rt/trunk/lib/builtins/clear_cache.c
===================================================================
--- compiler-rt/trunk/lib/builtins/clear_cache.c
+++ compiler-rt/trunk/lib/builtins/clear_cache.c
@@ -96,6 +96,8 @@
  * Intel processors have a unified instruction and data cache
  * so there is nothing to do
  */
+#elif defined(_WIN32) && (defined(__arm__) || defined(__aarch64__))
+    FlushInstructionCache(GetCurrentProcess(), start, end - start);
 #elif defined(__arm__) && !defined(__APPLE__)
     #if defined(__FreeBSD__) || defined(__NetBSD__)
         struct arm_sync_icache_args arg;
@@ -123,8 +125,6 @@
                           : "r"(syscall_nr), "r"(start_reg), "r"(end_reg),
                             "r"(flags));
          assert(start_reg == 0 && "Cache flush syscall failed.");
-    #elif defined(_WIN32)
-        FlushInstructionCache(GetCurrentProcess(), start, end - start);
     #else
         compilerrt_abort();
     #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42197.130563.patch
Type: text/x-patch
Size: 971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180119/7e83ce13/attachment.bin>


More information about the llvm-commits mailing list