Revision: 1340
http://vcs.pcre.org/viewvc?view=rev&revision=1340
Author: zherczeg
Date: 2013-06-18 08:49:46 +0100 (Tue, 18 Jun 2013)
Log Message:
-----------
Cache flush in JIT for android. Patch by Giuseppe D'Angelo.
Modified Paths:
--------------
code/trunk/sljit/sljitConfigInternal.h
Modified: code/trunk/sljit/sljitConfigInternal.h
===================================================================
--- code/trunk/sljit/sljitConfigInternal.h 2013-06-14 09:09:28 UTC (rev 1339)
+++ code/trunk/sljit/sljitConfigInternal.h 2013-06-18 07:49:46 UTC (rev 1340)
@@ -221,6 +221,13 @@
#define SLJIT_CACHE_FLUSH(from, to) \
sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
+#elif defined __ANDROID__
+
+/* Android lacks __clear_cache; instead, cacheflush should be used. */
+
+#define SLJIT_CACHE_FLUSH(from, to) \
+ cacheflush((long)(from), (long)(to), 0)
+
#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */