Make PCRE's JIT work on Android devices
__clear_cache is missing from Android; use cacheflush instead. Backport in Qt's own PCRE copy of the upstream fix: http://vcs.pcre.org/viewvc?view=revision&revision=1340 Task-number: QTBUG-31754 Change-Id: I4996265f7b19343ba24983d4f8b2f75e2b578504 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
44630a6f42
commit
5d439eb4ca
|
|
@ -0,0 +1,3 @@
|
|||
These patches are landed in upstream PCRE (they're marked with
|
||||
their SVN revision number). When upgrading PCRE remember check
|
||||
if the version you're upgrading to already contains them or not.
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
Index: sljit/sljitConfigInternal.h
|
||||
===================================================================
|
||||
--- sljit/sljitConfigInternal.h (revision 1339)
|
||||
+++ sljit/sljitConfigInternal.h (working copy)
|
||||
@@ -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. */
|
||||
|
|
@ -217,6 +217,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. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue