summaryrefslogtreecommitdiff
path: root/sljit
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-05-14 06:27:21 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-05-14 06:27:21 +0000
commit7ae466f381d3c6be4744205ba39a7a529368200b (patch)
tree5698bbb467997281a3eca0af04ba002736ee9d89 /sljit
parentc641dbe5653386777c6daf1d7454ea996017d8c7 (diff)
downloadpcre-7ae466f381d3c6be4744205ba39a7a529368200b.tar.gz
JIT compiler update
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@966 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'sljit')
-rw-r--r--sljit/sljitLir.c4
-rw-r--r--sljit/sljitNativeX86_common.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sljit/sljitLir.c b/sljit/sljitLir.c
index 6c61270..e607ec8 100644
--- a/sljit/sljitLir.c
+++ b/sljit/sljitLir.c
@@ -1360,7 +1360,9 @@ SLJIT_API_FUNC_ATTRIBUTE int sljit_get_local_base(struct sljit_compiler *compile
#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
diff --git a/sljit/sljitNativeX86_common.c b/sljit/sljitNativeX86_common.c
index 49b9089..019e587 100644
--- a/sljit/sljitNativeX86_common.c
+++ b/sljit/sljitNativeX86_common.c
@@ -2616,7 +2616,9 @@ SLJIT_API_FUNC_ATTRIBUTE int sljit_get_local_base(struct sljit_compiler *compile
}
#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)