[PATCH] D42332: [compiler-rt] Implement __clear_cache() on OpenBSD/mips64
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 20 06:18:10 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT323039: [compiler-rt] Implement __clear_cache() on OpenBSD/mips64 (authored by kamil, committed by ).
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D42332
Files:
lib/builtins/clear_cache.c
Index: lib/builtins/clear_cache.c
===================================================================
--- lib/builtins/clear_cache.c
+++ lib/builtins/clear_cache.c
@@ -33,6 +33,11 @@
#include <machine/sysarch.h>
#endif
+#if defined(__OpenBSD__) && defined(__mips__)
+ #include <sys/types.h>
+ #include <machine/sysarch.h>
+#endif
+
#if defined(__linux__) && defined(__mips__)
#include <sys/cachectl.h>
#include <sys/syscall.h>
@@ -142,6 +147,8 @@
#else
syscall(__NR_cacheflush, start, (end_int - start_int), BCACHE);
#endif
+#elif defined(__mips__) && defined(__OpenBSD__)
+ cacheflush(start, (uintptr_t)end - (uintptr_t)start, BCACHE);
#elif defined(__aarch64__) && !defined(__APPLE__)
uint64_t xstart = (uint64_t)(uintptr_t) start;
uint64_t xend = (uint64_t)(uintptr_t) end;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42332.130760.patch
Type: text/x-patch
Size: 819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180120/36705032/attachment.bin>
More information about the llvm-commits
mailing list