diff options
author | zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069> | 2016-04-06 07:18:42 +0000 |
---|---|---|
committer | zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069> | 2016-04-06 07:18:42 +0000 |
commit | 9add06fce4b452ceca29c11581dcd0a0770750bd (patch) | |
tree | f79ede8671b92e71559a3044bc5b498e0fad7a85 /src/sljit/sljitConfigInternal.h | |
parent | 17c757259fba7a65e9bb901a6528acd9e724202c (diff) | |
download | pcre2-9add06fce4b452ceca29c11581dcd0a0770750bd.tar.gz |
Support Android ARM64 cacheflush in JIT. Patch by Tavian Barnes.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@508 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/sljit/sljitConfigInternal.h')
-rw-r--r-- | src/sljit/sljitConfigInternal.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sljit/sljitConfigInternal.h b/src/sljit/sljitConfigInternal.h index f2ef022..9275b14 100644 --- a/src/sljit/sljitConfigInternal.h +++ b/src/sljit/sljitConfigInternal.h @@ -279,6 +279,15 @@ /* Instruction cache flush. */ /****************************/ +#if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin) +#if __has_builtin(__builtin___clear_cache) + +#define SLJIT_CACHE_FLUSH(from, to) \ + __builtin___clear_cache((char*)from, (char*)to) + +#endif /* __has_builtin(__builtin___clear_cache) */ +#endif /* (!defined SLJIT_CACHE_FLUSH && defined __has_builtin) */ + #ifndef SLJIT_CACHE_FLUSH #if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) @@ -295,6 +304,11 @@ #define SLJIT_CACHE_FLUSH(from, to) \ sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from)) +#elif (defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) + +#define SLJIT_CACHE_FLUSH(from, to) \ + __builtin___clear_cache((char*)from, (char*)to) + #elif defined __ANDROID__ /* Android lacks __clear_cache; instead, cacheflush should be used. */ @@ -307,12 +321,14 @@ /* 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. */ #define SLJIT_CACHE_FLUSH(from, to) \ sparc_cache_flush((from), (to)) +#define SLJIT_CACHE_FLUSH_OWN_IMPL 1 #else |