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

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [1663] code/trunk/sljit: Minor JIT compiler update.
Revision: 1663
          http://vcs.pcre.org/viewvc?view=rev&revision=1663
Author:   zherczeg
Date:     2016-07-17 05:35:25 +0100 (Sun, 17 Jul 2016)
Log Message:
-----------
Minor JIT compiler update.


Modified Paths:
--------------
    code/trunk/sljit/sljitConfig.h
    code/trunk/sljit/sljitConfigInternal.h
    code/trunk/sljit/sljitNativeX86_common.c


Modified: code/trunk/sljit/sljitConfig.h
===================================================================
--- code/trunk/sljit/sljitConfig.h    2016-07-15 09:57:53 UTC (rev 1662)
+++ code/trunk/sljit/sljitConfig.h    2016-07-17 04:35:25 UTC (rev 1663)
@@ -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

Modified: code/trunk/sljit/sljitConfigInternal.h
===================================================================
--- code/trunk/sljit/sljitConfigInternal.h    2016-07-15 09:57:53 UTC (rev 1662)
+++ code/trunk/sljit/sljitConfigInternal.h    2016-07-17 04:35:25 UTC (rev 1663)
@@ -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

Modified: code/trunk/sljit/sljitNativeX86_common.c
===================================================================
--- code/trunk/sljit/sljitNativeX86_common.c    2016-07-15 09:57:53 UTC (rev 1662)
+++ code/trunk/sljit/sljitNativeX86_common.c    2016-07-17 04:35:25 UTC (rev 1663)
@@ -298,11 +298,6 @@
     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 @@
             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 @@
     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 @@
 #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
 }