summaryrefslogtreecommitdiff
path: root/sljit/sljitNativeMIPS_common.c
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-11-05 12:30:13 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-11-05 12:30:13 +0000
commit1134d4d8bb12f6e9f188744bc742f63a73143cf8 (patch)
tree31df4f58c49533eb705fec30509f915d37196640 /sljit/sljitNativeMIPS_common.c
parent1590b077fee62ff4f0849b40d9afb150a4f8424e (diff)
downloadpcre-1134d4d8bb12f6e9f188744bc742f63a73143cf8.tar.gz
JIT compiler update.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1203 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'sljit/sljitNativeMIPS_common.c')
-rw-r--r--sljit/sljitNativeMIPS_common.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sljit/sljitNativeMIPS_common.c b/sljit/sljitNativeMIPS_common.c
index 92b25a3..dd7606c 100644
--- a/sljit/sljitNativeMIPS_common.c
+++ b/sljit/sljitNativeMIPS_common.c
@@ -1748,6 +1748,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compil
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_cond_value(struct sljit_compiler *compiler, sljit_si op, sljit_si dst, sljit_sw dstw, sljit_si type)
{
sljit_si sugg_dst_ar, dst_ar;
+ sljit_si flags = GET_ALL_FLAGS(op);
CHECK_ERROR();
check_sljit_emit_cond_value(compiler, op, dst, dstw, type);
@@ -1756,7 +1757,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_cond_value(struct sljit_compiler *c
if (dst == SLJIT_UNUSED)
return SLJIT_SUCCESS;
- sugg_dst_ar = DR((op == SLJIT_MOV && dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG2);
+ op = GET_OPCODE(op);
+ sugg_dst_ar = DR((op < SLJIT_ADD && dst >= SLJIT_TEMPORARY_REG1 && dst <= SLJIT_NO_REGISTERS) ? dst : TMP_REG2);
switch (type) {
case SLJIT_C_EQUAL:
@@ -1818,10 +1820,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_cond_value(struct sljit_compiler *c
dst_ar = sugg_dst_ar;
}
- if (GET_OPCODE(op) == SLJIT_OR) {
+ if (op == SLJIT_AND || op == SLJIT_OR) {
if (DR(TMP_REG2) != dst_ar)
FAIL_IF(push_inst(compiler, ADDU_W | SA(dst_ar) | TA(0) | D(TMP_REG2), DR(TMP_REG2)));
- return emit_op(compiler, op, CUMULATIVE_OP | LOGICAL_OP | IMM_OP, dst, dstw, dst, dstw, TMP_REG2, 0);
+ return emit_op(compiler, op | flags, CUMULATIVE_OP | LOGICAL_OP | IMM_OP, dst, dstw, dst, dstw, TMP_REG2, 0);
}
if (dst & SLJIT_MEM)