Lines Matching refs:flags

303 static SLJIT_INLINE sljit_ins invert_branch(sljit_s32 flags)  in invert_branch()  argument
305 if (flags & IS_BIT26_COND) in invert_branch()
308 if (flags & IS_BIT23_COND) in invert_branch()
322 if (jump->flags & (SLJIT_REWRITABLE_JUMP | IS_CALL)) in detect_jump_type()
325 if (jump->flags & SLJIT_REWRITABLE_JUMP) in detect_jump_type()
329 if (jump->flags & JUMP_ADDR) in detect_jump_type()
332 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
337 if (jump->flags & IS_COND) in detect_jump_type()
341 if (jump->flags & IS_CALL) in detect_jump_type()
346 if (jump->flags & IS_MOVABLE) { in detect_jump_type()
349 jump->flags |= PATCH_B; in detect_jump_type()
351 if (!(jump->flags & IS_COND)) { in detect_jump_type()
353 inst[-1] = (jump->flags & IS_JAL) ? BAL : B; in detect_jump_type()
359 inst[-1] = saved_inst ^ invert_branch(jump->flags); in detect_jump_type()
367 jump->flags |= PATCH_B; in detect_jump_type()
369 if (!(jump->flags & IS_COND)) { in detect_jump_type()
370 inst[0] = (jump->flags & IS_JAL) ? BAL : B; in detect_jump_type()
374 inst[0] = inst[0] ^ invert_branch(jump->flags); in detect_jump_type()
381 if (jump->flags & IS_COND) { in detect_jump_type()
382 …if ((jump->flags & IS_MOVABLE) && (target_addr & ~0xfffffff) == ((jump->addr + 2 * sizeof(sljit_in… in detect_jump_type()
383 jump->flags |= PATCH_J; in detect_jump_type()
392 jump->flags |= PATCH_J; in detect_jump_type()
403 if ((jump->flags & IS_MOVABLE) && (target_addr & ~0xfffffff) == (jump->addr & ~0xfffffff)) { in detect_jump_type()
404 jump->flags |= PATCH_J; in detect_jump_type()
406 inst[-1] = (jump->flags & IS_JAL) ? JAL : J; in detect_jump_type()
412 jump->flags |= PATCH_J; in detect_jump_type()
413 inst[0] = (jump->flags & IS_JAL) ? JAL : J; in detect_jump_type()
422 jump->flags |= PATCH_ABS32; in detect_jump_type()
423 if (jump->flags & IS_COND) { in detect_jump_type()
432 jump->flags |= PATCH_ABS48; in detect_jump_type()
433 if (jump->flags & IS_COND) { in detect_jump_type()
458 put_label->flags = 0; in put_label_get_length()
463 put_label->flags = 1; in put_label_get_length()
467 put_label->flags = 2; in put_label_get_length()
477 if (put_label->flags == 0) { in put_label_set()
481 else if (put_label->flags == 1) { in put_label_set()
600 addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; in sljit_generate_code()
603 if (jump->flags & PATCH_B) { in sljit_generate_code()
609 if (jump->flags & PATCH_J) { in sljit_generate_code()
620 if (jump->flags & PATCH_ABS32) { in sljit_generate_code()
625 else if (jump->flags & PATCH_ABS48) { in sljit_generate_code()
744 static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s…
915 static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar… in getput_arg_fast() argument
921 if (SLJIT_UNLIKELY(flags & ARG_TEST)) in getput_arg_fast()
923 FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(arg & REG_MASK) in getput_arg_fast()
924 …| TA(reg_ar) | IMM(argw), ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) ? reg_ar : MOVABL… in getput_arg_fast()
956 static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, slj… in getput_arg() argument
966 if ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) { in getput_arg()
982 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay… in getput_arg()
989 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay… in getput_arg()
992 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_… in getput_arg()
1010 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_… in getput_arg()
1018 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay… in getput_arg()
1032 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay… in getput_arg()
1037 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay… in getput_arg()
1041 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_… in getput_arg()
1044 static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s… in emit_op_mem() argument
1048 if (getput_arg_fast(compiler, flags, reg_ar, arg, argw)) in emit_op_mem()
1051 if ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) { in emit_op_mem()
1070 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_… in emit_op_mem()
1078 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_… in emit_op_mem()
1081 static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_… in emit_op_mem2() argument
1083 if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) in emit_op_mem2()
1085 return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); in emit_op_mem2()
1088 static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, in emit_op() argument
1102 if (!(flags & ALT_KEEP_CACHE)) { in emit_op()
1109 flags |= UNUSED_DEST; in emit_op()
1113 flags |= REG_DEST; in emit_op()
1117 …else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, DR(TMP_REG1), dst, dstw… in emit_op()
1118 flags |= SLOW_DEST; in emit_op()
1120 if (flags & IMM_OP) { in emit_op()
1122 if ((!(flags & LOGICAL_OP) && (src2w <= SIMM_MAX && src2w >= SIMM_MIN)) in emit_op()
1123 || ((flags & LOGICAL_OP) && !(src2w & ~UIMM_MAX))) { in emit_op()
1124 flags |= SRC2_IMM; in emit_op()
1128 if (!(flags & SRC2_IMM) && (flags & CUMULATIVE_OP) && (src1 & SLJIT_IMM) && src1w) { in emit_op()
1129 if ((!(flags & LOGICAL_OP) && (src1w <= SIMM_MAX && src1w >= SIMM_MIN)) in emit_op()
1130 || ((flags & LOGICAL_OP) && !(src1w & ~UIMM_MAX))) { in emit_op()
1131 flags |= SRC2_IMM; in emit_op()
1146 flags |= REG1_SOURCE; in emit_op()
1157 if (getput_arg_fast(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w)) in emit_op()
1160 flags |= SLOW_SRC1; in emit_op()
1167 flags |= REG2_SOURCE; in emit_op()
1168 if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOV_P) in emit_op()
1172 if (!(flags & SRC2_IMM)) { in emit_op()
1185 if (getput_arg_fast(compiler, flags | LOAD_DATA, DR(sugg_src2_r), src2, src2w)) in emit_op()
1188 flags |= SLOW_SRC2; in emit_op()
1192 if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) { in emit_op()
1195 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG2), src2, src2w, src1, src1w)); in emit_op()
1196 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, dst, dstw)); in emit_op()
1199 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, src2, src2w)); in emit_op()
1200 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG2), src2, src2w, dst, dstw)); in emit_op()
1203 else if (flags & SLOW_SRC1) in emit_op()
1204 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, dst, dstw)); in emit_op()
1205 else if (flags & SLOW_SRC2) in emit_op()
1206 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(sugg_src2_r), src2, src2w, dst, dstw)); in emit_op()
1208 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
1211 if (!(flags & SLOW_DEST)) { in emit_op()
1212 getput_arg_fast(compiler, flags, DR(dst_r), dst, dstw); in emit_op()
1215 return getput_arg(compiler, flags, DR(dst_r), dst, dstw, 0, 0); in emit_op()
1330 # define flags 0 in sljit_emit_op1() macro
1332 sljit_s32 flags = 0; in sljit_emit_op1()
1342 flags |= INT_DATA | SIGNED_DATA; in sljit_emit_op1()
1377 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1381 …return emit_op(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, s… in sljit_emit_op1()
1384 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1391 # undef flags in sljit_emit_op1()
1401 # define flags 0 in sljit_emit_op2() macro
1403 sljit_s32 flags = 0; in sljit_emit_op2()
1417 flags |= INT_DATA | SIGNED_DATA; in sljit_emit_op2()
1429 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1434 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1438 return emit_op(compiler, op, flags | CUMULATIVE_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1443 …return emit_op(compiler, op, flags | CUMULATIVE_OP | LOGICAL_OP | IMM_OP, dst, dstw, src1, src1w, … in sljit_emit_op2()
1459 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1466 # undef flags in sljit_emit_op2()
1535 # define flags 0 in sljit_emit_fop1_conv_sw_from_f64() macro
1537 sljit_s32 flags = (GET_OPCODE(op) == SLJIT_CONV_SW_FROM_F64) << 21; in sljit_emit_fop1_conv_sw_from_f64()
1545 …FAIL_IF(push_inst(compiler, (TRUNC_W_S ^ (flags >> 19)) | FMT(op) | FS(src) | FD(TMP_FREG1), MOVAB… in sljit_emit_fop1_conv_sw_from_f64()
1548 return push_inst(compiler, MFC1 | flags | T(dst) | FS(TMP_FREG1), MOVABLE_INS); in sljit_emit_fop1_conv_sw_from_f64()
1551 return emit_op_mem2(compiler, flags ? DOUBLE_DATA : SINGLE_DATA, FR(TMP_FREG1), dst, dstw, 0, 0); in sljit_emit_fop1_conv_sw_from_f64()
1563 # define flags 0 in sljit_emit_fop1_conv_f64_from_sw() macro
1565 sljit_s32 flags = (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_SW) << 21; in sljit_emit_fop1_conv_f64_from_sw()
1571 FAIL_IF(push_inst(compiler, MTC1 | flags | T(src) | FS(TMP_FREG1), MOVABLE_INS)); in sljit_emit_fop1_conv_f64_from_sw()
1574 …FAIL_IF(emit_op_mem2(compiler, ((flags) ? DOUBLE_DATA : SINGLE_DATA) | LOAD_DATA, FR(TMP_FREG1), s… in sljit_emit_fop1_conv_f64_from_sw()
1582 FAIL_IF(push_inst(compiler, MTC1 | flags | T(TMP_REG1) | FS(TMP_FREG1), MOVABLE_INS)); in sljit_emit_fop1_conv_f64_from_sw()
1585 …FAIL_IF(push_inst(compiler, CVT_S_S | flags | (4 << 21) | (((op & SLJIT_F32_OP) ^ SLJIT_F32_OP) >>… in sljit_emit_fop1_conv_f64_from_sw()
1592 # undef flags in sljit_emit_fop1_conv_f64_from_sw()
1687 sljit_s32 dst_r, flags = 0; in sljit_emit_fop2() local
1705 flags |= SLOW_SRC1; in sljit_emit_fop2()
1713 flags |= SLOW_SRC2; in sljit_emit_fop2()
1716 if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) { in sljit_emit_fop2()
1726 else if (flags & SLOW_SRC1) in sljit_emit_fop2()
1728 else if (flags & SLOW_SRC2) in sljit_emit_fop2()
1731 if (flags & SLOW_SRC1) in sljit_emit_fop2()
1733 if (flags & SLOW_SRC2) in sljit_emit_fop2()
1808 flags = IS_BIT26_COND; \
1813 flags = IS_BIT26_COND; \
1820 flags = IS_BIT23_COND; \
1824 flags = IS_BIT23_COND; \
1831 flags = IS_BIT16_COND; \
1835 flags = IS_BIT16_COND; \
1844 sljit_s32 flags = 0; in sljit_emit_jump() local
1894 jump->flags |= flags; in sljit_emit_jump()
1896 jump->flags |= IS_MOVABLE; in sljit_emit_jump()
1906 jump->flags |= IS_JAL; in sljit_emit_jump()
1940 sljit_s32 flags; in sljit_emit_cmp() local
1950 flags = ((type & SLJIT_I32_OP) ? INT_DATA : WORD_DATA) | LOAD_DATA; in sljit_emit_cmp()
1952 PTR_FAIL_IF(emit_op_mem2(compiler, flags, DR(TMP_REG1), src1, src1w, src2, src2w)); in sljit_emit_cmp()
1956 PTR_FAIL_IF(emit_op_mem2(compiler, flags, DR(TMP_REG2), src2, src2w, 0, 0)); in sljit_emit_cmp()
1968 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
1970 jump->flags |= IS_MOVABLE; in sljit_emit_cmp()
1980 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
1984 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
1988 jump->flags |= IS_BIT16_COND; in sljit_emit_cmp()
1992 jump->flags |= IS_BIT16_COND; in sljit_emit_cmp()
2002 jump->flags |= IS_BIT16_COND; in sljit_emit_cmp()
2006 jump->flags |= IS_BIT16_COND; in sljit_emit_cmp()
2010 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
2014 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
2042 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
2080 jump->flags |= IS_MOVABLE; in sljit_emit_ijump()