[Pcre-svn] [966] code/trunk: JIT compiler update

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [966] code/trunk: JIT compiler update
Revision: 966
          http://vcs.pcre.org/viewvc?view=rev&revision=966
Author:   zherczeg
Date:     2012-05-14 07:27:21 +0100 (Mon, 14 May 2012)


Log Message:
-----------
JIT compiler update

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/sljit/sljitLir.c
    code/trunk/sljit/sljitNativeX86_common.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2012-05-04 13:09:04 UTC (rev 965)
+++ code/trunk/ChangeLog    2012-05-14 06:27:21 UTC (rev 966)
@@ -111,7 +111,9 @@
 29. Check for an overlong MARK name and give an error at compile time. The 
     limit is 255 for the 8-bit library and 65535 for the 16-bit library.


+30. JIT compiler update.

+
Version 8.30 04-February-2012
-----------------------------


Modified: code/trunk/sljit/sljitLir.c
===================================================================
--- code/trunk/sljit/sljitLir.c    2012-05-04 13:09:04 UTC (rev 965)
+++ code/trunk/sljit/sljitLir.c    2012-05-14 06:27:21 UTC (rev 966)
@@ -1360,7 +1360,9 @@
 #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
     compiler->skip_checks = 1;
 #endif
-    return sljit_emit_op2(compiler, SLJIT_ADD, dst, dstw, SLJIT_LOCALS_REG, 0, SLJIT_IMM, offset);
+    if (offset != 0)
+        return sljit_emit_op2(compiler, SLJIT_ADD | SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_LOCALS_REG, 0, SLJIT_IMM, offset);
+    return sljit_emit_op1(compiler, SLJIT_MOV, dst, dstw, SLJIT_LOCALS_REG, 0);
 }


#endif

Modified: code/trunk/sljit/sljitNativeX86_common.c
===================================================================
--- code/trunk/sljit/sljitNativeX86_common.c    2012-05-04 13:09:04 UTC (rev 965)
+++ code/trunk/sljit/sljitNativeX86_common.c    2012-05-14 06:27:21 UTC (rev 966)
@@ -2616,7 +2616,9 @@
     }
 #endif


-    return emit_lea_binary(compiler, dst, dstw, SLJIT_LOCALS_REG, 0, SLJIT_IMM, offset);
+    if (offset != 0)
+        return emit_lea_binary(compiler, dst, dstw, SLJIT_LOCALS_REG, 0, SLJIT_IMM, offset);
+    return emit_mov(compiler, dst, dstw, SLJIT_LOCALS_REG, 0);
 }


SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value)