[llvm-branch-commits] [compiler-rt-branch] r323120 - Merging r323039:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jan 22 07:08:44 PST 2018


Author: hans
Date: Mon Jan 22 07:08:44 2018
New Revision: 323120

URL: http://llvm.org/viewvc/llvm-project?rev=323120&view=rev
Log:
Merging r323039:
------------------------------------------------------------------------
r323039 | kamil | 2018-01-20 15:16:16 +0100 (Sat, 20 Jan 2018) | 13 lines

[compiler-rt] Implement __clear_cache() on OpenBSD/mips64

Summary:
Make __clear_cache() invoke the platform's cache flush function
on OpenBSD/mips64.

Reviewers: krytarowski

Reviewed By: krytarowski

Subscribers: sdardis, dberris, arichardson, krytarowski, llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D42332
------------------------------------------------------------------------

Modified:
    compiler-rt/branches/release_60/   (props changed)
    compiler-rt/branches/release_60/lib/builtins/clear_cache.c

Propchange: compiler-rt/branches/release_60/
------------------------------------------------------------------------------
    svn:mergeinfo = /compiler-rt/trunk:323039

Modified: compiler-rt/branches/release_60/lib/builtins/clear_cache.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_60/lib/builtins/clear_cache.c?rev=323120&r1=323119&r2=323120&view=diff
==============================================================================
--- compiler-rt/branches/release_60/lib/builtins/clear_cache.c (original)
+++ compiler-rt/branches/release_60/lib/builtins/clear_cache.c Mon Jan 22 07:08:44 2018
@@ -33,6 +33,11 @@ uintptr_t GetCurrentProcess(void);
   #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 @@ void __clear_cache(void *start, void *en
     #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;




More information about the llvm-branch-commits mailing list