[Pcre-svn] [1692] code/trunk/sljit: Minor JIT compiler updat…

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [1692] code/trunk/sljit: Minor JIT compiler update.
Revision: 1692
          http://vcs.pcre.org/viewvc?view=rev&revision=1692
Author:   zherczeg
Date:     2017-03-28 10:55:50 +0100 (Tue, 28 Mar 2017)
Log Message:
-----------
Minor JIT compiler update.


Modified Paths:
--------------
    code/trunk/sljit/sljitConfigInternal.h
    code/trunk/sljit/sljitLir.h


Modified: code/trunk/sljit/sljitConfigInternal.h
===================================================================
--- code/trunk/sljit/sljitConfigInternal.h    2017-03-27 16:00:16 UTC (rev 1691)
+++ code/trunk/sljit/sljitConfigInternal.h    2017-03-28 09:55:50 UTC (rev 1692)
@@ -296,6 +296,13 @@
 #define SLJIT_CACHE_FLUSH(from, to) \
     sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))


+#elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)
+
+/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
+#define SLJIT_CACHE_FLUSH(from, to) \
+    ppc_cache_flush((from), (to))
+#define SLJIT_CACHE_FLUSH_OWN_IMPL 1
+
 #elif (defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))


 #define SLJIT_CACHE_FLUSH(from, to) \
@@ -308,13 +315,6 @@
 #define SLJIT_CACHE_FLUSH(from, to) \
     cacheflush((long)(from), (long)(to), 0)


-#elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)
-
-/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
-#define SLJIT_CACHE_FLUSH(from, to) \
-    ppc_cache_flush((from), (to))
-#define SLJIT_CACHE_FLUSH_OWN_IMPL 1
-
 #elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)


/* The __clear_cache() implementation of GCC is a dummy function on Sparc. */

Modified: code/trunk/sljit/sljitLir.h
===================================================================
--- code/trunk/sljit/sljitLir.h    2017-03-27 16:00:16 UTC (rev 1691)
+++ code/trunk/sljit/sljitLir.h    2017-03-28 09:55:50 UTC (rev 1692)
@@ -1302,6 +1302,15 @@


#endif /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */

+#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
+/* Free unused executable memory. The allocator keeps some free memory
+   around to reduce the number of OS executable memory allocations.
+   This improves performance since these calls are costly. However
+   it is sometimes desired to free all unused memory regions, e.g.
+   before the application terminates. */
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void);
+#endif
+
 /* --------------------------------------------------------------------- */
 /*  CPU specific functions                                               */
 /* --------------------------------------------------------------------- */