summaryrefslogtreecommitdiff
path: root/src/sljit/sljitNativeX86_common.c
diff options
context:
space:
mode:
authorzherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>2020-03-02 08:52:01 +0000
committerzherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>2020-03-02 08:52:01 +0000
commit8ff373e4f1f403c516cfca119356e9e3cf45aee3 (patch)
treecd73e7d73f926258ef58183ba5f7219f9e13a823 /src/sljit/sljitNativeX86_common.c
parent571ad09506eb7a13338056a44139073e7f29ad1a (diff)
downloadpcre2-8ff373e4f1f403c516cfca119356e9e3cf45aee3.tar.gz
Improve memory clearing in JIT.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1233 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/sljit/sljitNativeX86_common.c')
-rw-r--r--src/sljit/sljitNativeX86_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sljit/sljitNativeX86_common.c b/src/sljit/sljitNativeX86_common.c
index 9ced936..74965e3 100644
--- a/src/sljit/sljitNativeX86_common.c
+++ b/src/sljit/sljitNativeX86_common.c
@@ -2316,6 +2316,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compile
if (!HAS_FLAGS(op)) {
if ((src2 & SLJIT_IMM) && emit_lea_binary(compiler, dst, dstw, src1, src1w, SLJIT_IMM, -src2w) != SLJIT_ERR_UNSUPPORTED)
return compiler->error;
+ if (SLOW_IS_REG(dst) && src2 == dst) {
+ FAIL_IF(emit_non_cum_binary(compiler, BINARY_OPCODE(SUB), dst, 0, dst, 0, src1, src1w));
+ return emit_unary(compiler, NEG_rm, dst, 0, dst, 0);
+ }
}
if (dst == SLJIT_UNUSED)