Lines Matching refs:flags
205 if (jump->flags & SLJIT_REWRITABLE_JUMP) in detect_jump_type()
208 if (jump->flags & JUMP_ADDR) in detect_jump_type()
211 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
217 if (jump->flags & IS_CALL) { in detect_jump_type()
219 jump->flags |= PATCH_CALL; in detect_jump_type()
220 if (jump->flags & IS_MOVABLE) { in detect_jump_type()
235 if (jump->flags & IS_COND) in detect_jump_type()
238 if (jump->flags & IS_MOVABLE) { in detect_jump_type()
241 jump->flags |= PATCH_B; in detect_jump_type()
243 if (jump->flags & IS_COND) { in detect_jump_type()
258 jump->flags |= PATCH_B; in detect_jump_type()
259 if (jump->flags & IS_COND) in detect_jump_type()
348 addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; in sljit_generate_code()
351 if (jump->flags & PATCH_CALL) { in sljit_generate_code()
357 if (jump->flags & PATCH_B) { in sljit_generate_code()
509 static sljit_si getput_arg_fast(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, slji… in getput_arg_fast() argument
513 if (!(flags & WRITE_BACK) || !(arg & REG_MASK)) { in getput_arg_fast()
517 if (SLJIT_UNLIKELY(flags & ARG_TEST)) in getput_arg_fast()
519 FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] in getput_arg_fast()
520 | ((flags & MEM_MASK) <= GPR_REG ? D(reg) : DA(reg)) in getput_arg_fast()
522 ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) ? DR(reg) : MOVABLE_INS)); in getput_arg_fast()
552 static sljit_si getput_arg(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_si … in getput_arg() argument
577 …else if ((flags & LOAD_DATA) && ((flags & MEM_MASK) <= GPR_REG) && reg != base && reg != OFFS_REG(… in getput_arg()
598 else if ((flags & LOAD_DATA) && ((flags & MEM_MASK) <= GPR_REG) && reg != base) in getput_arg()
606 dest = ((flags & MEM_MASK) <= GPR_REG ? D(reg) : DA(reg)); in getput_arg()
607 delay_slot = ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) ? DR(reg) : MOVABLE_INS; in getput_arg()
609 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(arg2) | IMM(0), delay… in getput_arg()
610 if (!(flags & WRITE_BACK)) in getput_arg()
611 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), del… in getput_arg()
612 …FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), de… in getput_arg()
616 static SLJIT_INLINE sljit_si emit_op_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si … in emit_op_mem() argument
618 if (getput_arg_fast(compiler, flags, reg, arg, argw)) in emit_op_mem()
622 return getput_arg(compiler, flags, reg, arg, argw, 0, 0); in emit_op_mem()
625 static SLJIT_INLINE sljit_si emit_op_mem2(struct sljit_compiler *compiler, sljit_si flags, sljit_si… in emit_op_mem2() argument
627 if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) in emit_op_mem2()
629 return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); in emit_op_mem2()
632 static sljit_si emit_op(struct sljit_compiler *compiler, sljit_si op, sljit_si flags, in emit_op() argument
646 if (!(flags & ALT_KEEP_CACHE)) { in emit_op()
657 flags |= REG_DEST; in emit_op()
661 else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, TMP_REG1, dst, dstw)) in emit_op()
662 flags |= SLOW_DEST; in emit_op()
664 if (flags & IMM_OP) { in emit_op()
667 flags |= SRC2_IMM; in emit_op()
671 if (!(flags & SRC2_IMM) && (flags & CUMULATIVE_OP) && (src1 & SLJIT_IMM) && src1w) { in emit_op()
673 flags |= SRC2_IMM; in emit_op()
697 if (getput_arg_fast(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w)) in emit_op()
700 flags |= SLOW_SRC1; in emit_op()
707 flags |= REG2_SOURCE; in emit_op()
708 if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_SI) in emit_op()
712 if (!(flags & SRC2_IMM)) { in emit_op()
725 if (getput_arg_fast(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w)) in emit_op()
728 flags |= SLOW_SRC2; in emit_op()
732 if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) { in emit_op()
735 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, src1, src1w)); in emit_op()
736 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
739 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w)); in emit_op()
740 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw)); in emit_op()
743 else if (flags & SLOW_SRC1) in emit_op()
744 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
745 else if (flags & SLOW_SRC2) in emit_op()
746 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw)); in emit_op()
748 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
751 if (!(flags & SLOW_DEST)) { in emit_op()
752 getput_arg_fast(compiler, flags, dst_r, dst, dstw); in emit_op()
755 return getput_arg(compiler, flags, dst_r, dst, dstw, 0, 0); in emit_op()
811 sljit_si flags = GET_FLAGS(op) ? SET_FLAGS : 0; in sljit_emit_op1() local
822 return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
825 return emit_op(compiler, SLJIT_MOV_UI, flags | INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
828 …return emit_op(compiler, SLJIT_MOV_SI, flags | INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
831 …return emit_op(compiler, SLJIT_MOV_UB, flags | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJI… in sljit_emit_op1()
834 …return emit_op(compiler, SLJIT_MOV_SB, flags | BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, sr… in sljit_emit_op1()
837 …return emit_op(compiler, SLJIT_MOV_UH, flags | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJI… in sljit_emit_op1()
840 …return emit_op(compiler, SLJIT_MOV_SH, flags | HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, sr… in sljit_emit_op1()
844 …return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, s… in sljit_emit_op1()
847 …return emit_op(compiler, SLJIT_MOV_UI, flags | INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src,… in sljit_emit_op1()
850 …return emit_op(compiler, SLJIT_MOV_SI, flags | INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP… in sljit_emit_op1()
853 …return emit_op(compiler, SLJIT_MOV_UB, flags | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
856 …return emit_op(compiler, SLJIT_MOV_SB, flags | BYTE_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TM… in sljit_emit_op1()
859 …return emit_op(compiler, SLJIT_MOV_UH, flags | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
862 …return emit_op(compiler, SLJIT_MOV_SH, flags | HALF_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TM… in sljit_emit_op1()
866 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
869 return emit_op(compiler, SLJIT_SUB, flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
880 sljit_si flags = GET_FLAGS(op) ? SET_FLAGS : 0; in sljit_emit_op2() local
896 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
900 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
911 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1095 sljit_si dst_r, flags = 0; in sljit_emit_fop2() local
1113 flags |= SLOW_SRC1; in sljit_emit_fop2()
1123 flags |= SLOW_SRC2; in sljit_emit_fop2()
1128 if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) { in sljit_emit_fop2()
1138 else if (flags & SLOW_SRC1) in sljit_emit_fop2()
1140 else if (flags & SLOW_SRC2) in sljit_emit_fop2()
1143 if (flags & SLOW_SRC1) in sljit_emit_fop2()
1145 if (flags & SLOW_SRC2) in sljit_emit_fop2()
1302 jump->flags |= IS_COND; in sljit_emit_jump()
1304 jump->flags |= IS_MOVABLE; in sljit_emit_jump()
1312 jump->flags |= IS_COND; in sljit_emit_jump()
1314 jump->flags |= IS_MOVABLE; in sljit_emit_jump()
1322 jump->flags |= IS_MOVABLE; in sljit_emit_jump()
1324 jump->flags |= IS_CALL; in sljit_emit_jump()
1352 jump->flags |= IS_MOVABLE; in sljit_emit_ijump()
1354 jump->flags |= IS_CALL; in sljit_emit_ijump()
1375 sljit_si reg, flags = (GET_FLAGS(op) ? SET_FLAGS : 0); in sljit_emit_op_flags() local
1407 …return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw… in sljit_emit_op_flags()