[PATCH] [mips] Add __clear_cache() definition for non-Android systems

Petar Jovanovic petar.jovanovic at imgtec.com
Tue Feb 10 15:38:18 PST 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7205

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
@@ -22,10 +22,10 @@
   #include <machine/sysarch.h>
 #endif
 
-#if defined(__ANDROID__) && defined(__mips__)
+#if defined(__mips__)
   #include <sys/cachectl.h>
   #include <sys/syscall.h>
-  #ifdef __LP64__
+  #if defined(__ANDROID__) && defined(__LP64__)
     /*
      * clear_mips_cache - Invalidates instruction cache for Mips.
      */
@@ -109,10 +109,10 @@
     #else
         compilerrt_abort();
     #endif
-#elif defined(__ANDROID__) && defined(__mips__)
+#elif defined(__mips__)
   const uintptr_t start_int = (uintptr_t) start;
   const uintptr_t end_int = (uintptr_t) end;
-    #ifdef __LP64__
+    #if defined(__ANDROID__) && defined(__LP64__)
         // Call synci implementation for short address range.
         const uintptr_t address_range_limit = 256;
         if ((end_int - start_int) <= address_range_limit) {

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7205.19715.patch
Type: text/x-patch
Size: 1051 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150210/06a844eb/attachment.bin>


More information about the llvm-commits mailing list