summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-05-14 07:36:39 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-05-14 07:36:39 +0000
commit8685a45dd32d37c18c0509fdf2a7e724fc6542f8 (patch)
tree6ca5c55e6175a69afc9860c3498de718842e41ca
parent7ae466f381d3c6be4744205ba39a7a529368200b (diff)
downloadpcre-8685a45dd32d37c18c0509fdf2a7e724fc6542f8.tar.gz
cache flush for Apple devices
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@967 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog3
-rw-r--r--sljit/sljitConfigInternal.h21
2 files changed, 18 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a4c612..743f3b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -113,6 +113,9 @@ Version 8.31
30. JIT compiler update.
+31. JIT is now supported on jailbroken iOS devices. Thanks for Ruiger
+ Rill for the patch.
+
Version 8.30 04-February-2012
-----------------------------
diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h
index 0200285..ad12bfd 100644
--- a/sljit/sljitConfigInternal.h
+++ b/sljit/sljitConfigInternal.h
@@ -194,16 +194,25 @@
#ifndef SLJIT_CACHE_FLUSH
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+
+/* Not required to implement on archs with unified caches. */
+#define SLJIT_CACHE_FLUSH(from, to)
+
+#elif defined __APPLE__
+
+/* Supported by all macs since Mac OS 10.5.
+ However, it does not work on non-jailbroken iOS devices,
+ although the compilation is successful. */
-/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
#define SLJIT_CACHE_FLUSH(from, to) \
- ppc_cache_flush((from), (to))
+ sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
-#elif (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-/* Not required to implement on archs with unified caches. */
-#define SLJIT_CACHE_FLUSH(from, to)
+/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
+#define SLJIT_CACHE_FLUSH(from, to) \
+ ppc_cache_flush((from), (to))
#else