[llvm-branch-commits] [compiler-rt] 7d4d7a7 - [compiler-rt] Implement __clear_cache() on OpenBSD/arm

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Sep 7 11:03:28 PDT 2020


Author: Brad Smith
Date: 2020-09-07T20:03:16+02:00
New Revision: 7d4d7a7bf1e8d99b80da66afde7df81b05f77538

URL: https://github.com/llvm/llvm-project/commit/7d4d7a7bf1e8d99b80da66afde7df81b05f77538
DIFF: https://github.com/llvm/llvm-project/commit/7d4d7a7bf1e8d99b80da66afde7df81b05f77538.diff

LOG: [compiler-rt] Implement __clear_cache() on OpenBSD/arm

(cherry picked from commit 8542dab909f895a8b6812428bb5e1acf7ea15305)

Added: 
    

Modified: 
    compiler-rt/lib/builtins/clear_cache.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/builtins/clear_cache.c b/compiler-rt/lib/builtins/clear_cache.c
index 72e02e613de5..29e31f55d499 100644
--- a/compiler-rt/lib/builtins/clear_cache.c
+++ b/compiler-rt/lib/builtins/clear_cache.c
@@ -33,7 +33,7 @@ uintptr_t GetCurrentProcess(void);
 #include <machine/sysarch.h>
 #endif
 
-#if defined(__OpenBSD__) && defined(__mips__)
+#if defined(__OpenBSD__) && (defined(__arm__) || defined(__mips__))
 // clang-format off
 #include <sys/types.h>
 #include <machine/sysarch.h>
@@ -58,7 +58,7 @@ void __clear_cache(void *start, void *end) {
 #elif defined(_WIN32) && (defined(__arm__) || defined(__aarch64__))
   FlushInstructionCache(GetCurrentProcess(), start, end - start);
 #elif defined(__arm__) && !defined(__APPLE__)
-#if defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
   struct arm_sync_icache_args arg;
 
   arg.addr = (uintptr_t)start;


        


More information about the llvm-branch-commits mailing list