summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2016-07-17 04:35:25 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2016-07-17 04:35:25 +0000
commitf6b31ef64cbe2b68733ebb049e8a8339f3918d3a (patch)
treea471cf185a52679c813cfe3df3997acdf005bf91
parentce9da0eedbd59c8752c94fba3acddeee66834081 (diff)
downloadpcre-f6b31ef64cbe2b68733ebb049e8a8339f3918d3a.tar.gz
Minor JIT compiler update.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1663 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--sljit/sljitConfig.h2
-rw-r--r--sljit/sljitConfigInternal.h4
-rw-r--r--sljit/sljitNativeX86_common.c11
3 files changed, 4 insertions, 13 deletions
diff --git a/sljit/sljitConfig.h b/sljit/sljitConfig.h
index 1c8a521..a548c37 100644
--- a/sljit/sljitConfig.h
+++ b/sljit/sljitConfig.h
@@ -82,7 +82,7 @@
/* --------------------------------------------------------------------- */
/* If SLJIT_STD_MACROS_DEFINED is not defined, the application should
- define SLJIT_MALLOC, SLJIT_FREE, SLJIT_MEMMOVE, and NULL. */
+ define SLJIT_MALLOC, SLJIT_FREE, SLJIT_MEMCPY, and NULL. */
#ifndef SLJIT_STD_MACROS_DEFINED
/* Disabled by default. */
#define SLJIT_STD_MACROS_DEFINED 0
diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h
index 1456bd5..566c368 100644
--- a/sljit/sljitConfigInternal.h
+++ b/sljit/sljitConfigInternal.h
@@ -210,10 +210,6 @@
#define SLJIT_FREE(ptr, allocator_data) free(ptr)
#endif
-#ifndef SLJIT_MEMMOVE
-#define SLJIT_MEMMOVE(dest, src, len) memmove(dest, src, len)
-#endif
-
#ifndef SLJIT_MEMCPY
#define SLJIT_MEMCPY(dest, src, len) memcpy(dest, src, len)
#endif
diff --git a/sljit/sljitNativeX86_common.c b/sljit/sljitNativeX86_common.c
index 0d1de96..aa5ba08 100644
--- a/sljit/sljitNativeX86_common.c
+++ b/sljit/sljitNativeX86_common.c
@@ -298,11 +298,6 @@ static SLJIT_INLINE void sljit_unaligned_store_sw(void *addr, sljit_sw value)
SLJIT_MEMCPY(addr, &value, sizeof(value));
}
-static SLJIT_INLINE void sljit_unaligned_store_uw(void *addr, sljit_uw value)
-{
- SLJIT_MEMCPY(addr, &value, sizeof(value));
-}
-
/******************************************************/
/* Utility functions */
/******************************************************/
@@ -506,7 +501,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil
len = *buf_ptr++;
if (len > 0) {
/* The code is already generated. */
- SLJIT_MEMMOVE(code_ptr, buf_ptr, len);
+ SLJIT_MEMCPY(code_ptr, buf_ptr, len);
code_ptr += len;
buf_ptr += len;
}
@@ -2276,7 +2271,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *c
inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
FAIL_IF(!inst);
INC_SIZE(size);
- SLJIT_MEMMOVE(inst, instruction, size);
+ SLJIT_MEMCPY(inst, instruction, size);
return SLJIT_SUCCESS;
}
@@ -2956,7 +2951,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ad
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
sljit_unaligned_store_sw((void*)addr, new_addr - (addr + 4));
#else
- sljit_unaligned_store_uw((void*)addr, new_addr);
+ sljit_unaligned_store_sw((void*)addr, (sljit_sw) new_addr);
#endif
}