[compiler-rt] r199492 - Support NetBSD/ARM.
Joerg Sonnenberger
joerg at bec.de
Fri Jan 17 06:06:22 PST 2014
Author: joerg
Date: Fri Jan 17 08:06:22 2014
New Revision: 199492
URL: http://llvm.org/viewvc/llvm-project?rev=199492&view=rev
Log:
Support NetBSD/ARM.
Modified:
compiler-rt/trunk/lib/clear_cache.c
Modified: compiler-rt/trunk/lib/clear_cache.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/clear_cache.c?rev=199492&r1=199491&r2=199492&view=diff
==============================================================================
--- compiler-rt/trunk/lib/clear_cache.c (original)
+++ compiler-rt/trunk/lib/clear_cache.c Fri Jan 17 08:06:22 2014
@@ -13,6 +13,9 @@
#if __APPLE__
#include <libkern/OSCacheControl.h>
#endif
+#if defined(__NetBSD__) && defined(__arm__)
+ #include <machine/sysarch.h>
+#endif
/*
* The compiler generates calls to __clear_cache() when creating
@@ -28,6 +31,13 @@ void __clear_cache(void* start, void* en
* Intel processors have a unified instruction and data cache
* so there is nothing to do
*/
+#elif defined(__NetBSD__) && defined(__arm__)
+ struct arm_sync_icache_args arg;
+
+ arg.addr = (uintptr_t)start;
+ arg.len = (uintptr_t)end - (uintptr_t)start;
+
+ sysarch(ARM_SYNC_ICACHE, &arg);
#else
#if __APPLE__
/* On Darwin, sys_icache_invalidate() provides this functionality */
More information about the llvm-commits
mailing list