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()
743 static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s…
914 static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar… in getput_arg_fast() argument
920 if (SLJIT_UNLIKELY(flags & ARG_TEST)) in getput_arg_fast()
922 FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(arg & REG_MASK) in getput_arg_fast()
923 …| TA(reg_ar) | IMM(argw), ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) ? reg_ar : MOVABL… in getput_arg_fast()
955 static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, slj… in getput_arg() argument
965 if ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) { in getput_arg()
981 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay… in getput_arg()
988 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay… in getput_arg()
991 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_… in getput_arg()
1009 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_… in getput_arg()
1017 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay… in getput_arg()
1031 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay… in getput_arg()
1036 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay… in getput_arg()
1040 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_… in getput_arg()
1043 static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s… in emit_op_mem() argument
1047 if (getput_arg_fast(compiler, flags, reg_ar, arg, argw)) in emit_op_mem()
1050 if ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) { in emit_op_mem()
1069 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_… in emit_op_mem()
1077 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_… in emit_op_mem()
1080 static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_… in emit_op_mem2() argument
1082 if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) in emit_op_mem2()
1084 return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); in emit_op_mem2()
1087 static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, in emit_op() argument
1101 if (!(flags & ALT_KEEP_CACHE)) { in emit_op()
1108 flags |= UNUSED_DEST; in emit_op()
1112 flags |= REG_DEST; in emit_op()
1116 …else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, DR(TMP_REG1), dst, dstw… in emit_op()
1117 flags |= SLOW_DEST; in emit_op()
1119 if (flags & IMM_OP) { in emit_op()
1121 if ((!(flags & LOGICAL_OP) && (src2w <= SIMM_MAX && src2w >= SIMM_MIN)) in emit_op()
1122 || ((flags & LOGICAL_OP) && !(src2w & ~UIMM_MAX))) { in emit_op()
1123 flags |= SRC2_IMM; in emit_op()
1127 if (!(flags & SRC2_IMM) && (flags & CUMULATIVE_OP) && (src1 & SLJIT_IMM) && src1w) { in emit_op()
1128 if ((!(flags & LOGICAL_OP) && (src1w <= SIMM_MAX && src1w >= SIMM_MIN)) in emit_op()
1129 || ((flags & LOGICAL_OP) && !(src1w & ~UIMM_MAX))) { in emit_op()
1130 flags |= SRC2_IMM; in emit_op()
1145 flags |= REG1_SOURCE; in emit_op()
1156 if (getput_arg_fast(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w)) in emit_op()
1159 flags |= SLOW_SRC1; in emit_op()
1166 flags |= REG2_SOURCE; in emit_op()
1167 if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOV_P) in emit_op()
1171 if (!(flags & SRC2_IMM)) { in emit_op()
1184 if (getput_arg_fast(compiler, flags | LOAD_DATA, DR(sugg_src2_r), src2, src2w)) in emit_op()
1187 flags |= SLOW_SRC2; in emit_op()
1191 if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) { in emit_op()
1194 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG2), src2, src2w, src1, src1w)); in emit_op()
1195 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, dst, dstw)); in emit_op()
1198 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, src2, src2w)); in emit_op()
1199 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG2), src2, src2w, dst, dstw)); in emit_op()
1202 else if (flags & SLOW_SRC1) in emit_op()
1203 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, dst, dstw)); in emit_op()
1204 else if (flags & SLOW_SRC2) in emit_op()
1205 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(sugg_src2_r), src2, src2w, dst, dstw)); in emit_op()
1207 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
1210 if (!(flags & SLOW_DEST)) { in emit_op()
1211 getput_arg_fast(compiler, flags, DR(dst_r), dst, dstw); in emit_op()
1214 return getput_arg(compiler, flags, DR(dst_r), dst, dstw, 0, 0); in emit_op()
1329 # define flags 0 in sljit_emit_op1() macro
1331 sljit_s32 flags = 0; in sljit_emit_op1()
1341 flags |= INT_DATA | SIGNED_DATA; in sljit_emit_op1()
1376 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1379 …return emit_op(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, s… in sljit_emit_op1()
1382 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1389 # undef flags in sljit_emit_op1()
1399 # define flags 0 in sljit_emit_op2() macro
1401 sljit_s32 flags = 0; in sljit_emit_op2()
1415 flags |= INT_DATA | SIGNED_DATA; in sljit_emit_op2()
1426 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1430 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1433 return emit_op(compiler, op, flags | CUMULATIVE_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1438 …return emit_op(compiler, op, flags | CUMULATIVE_OP | LOGICAL_OP | IMM_OP, dst, dstw, src1, src1w, … in sljit_emit_op2()
1454 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1461 # undef flags in sljit_emit_op2()
1530 # define flags 0 in sljit_emit_fop1_conv_sw_from_f64() macro
1532 sljit_s32 flags = (GET_OPCODE(op) == SLJIT_CONV_SW_FROM_F64) << 21; in sljit_emit_fop1_conv_sw_from_f64()
1540 …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()
1543 return push_inst(compiler, MFC1 | flags | T(dst) | FS(TMP_FREG1), MOVABLE_INS); in sljit_emit_fop1_conv_sw_from_f64()
1546 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()
1558 # define flags 0 in sljit_emit_fop1_conv_f64_from_sw() macro
1560 sljit_s32 flags = (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_SW) << 21; in sljit_emit_fop1_conv_f64_from_sw()
1566 FAIL_IF(push_inst(compiler, MTC1 | flags | T(src) | FS(TMP_FREG1), MOVABLE_INS)); in sljit_emit_fop1_conv_f64_from_sw()
1569 …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()
1577 FAIL_IF(push_inst(compiler, MTC1 | flags | T(TMP_REG1) | FS(TMP_FREG1), MOVABLE_INS)); in sljit_emit_fop1_conv_f64_from_sw()
1580 …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()
1587 # undef flags in sljit_emit_fop1_conv_f64_from_sw()
1682 sljit_s32 dst_r, flags = 0; in sljit_emit_fop2() local
1700 flags |= SLOW_SRC1; in sljit_emit_fop2()
1708 flags |= SLOW_SRC2; in sljit_emit_fop2()
1711 if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) { in sljit_emit_fop2()
1721 else if (flags & SLOW_SRC1) in sljit_emit_fop2()
1723 else if (flags & SLOW_SRC2) in sljit_emit_fop2()
1726 if (flags & SLOW_SRC1) in sljit_emit_fop2()
1728 if (flags & SLOW_SRC2) in sljit_emit_fop2()
1803 flags = IS_BIT26_COND; \
1808 flags = IS_BIT26_COND; \
1815 flags = IS_BIT23_COND; \
1819 flags = IS_BIT23_COND; \
1826 flags = IS_BIT16_COND; \
1830 flags = IS_BIT16_COND; \
1839 sljit_s32 flags = 0; in sljit_emit_jump() local
1891 jump->flags |= flags; in sljit_emit_jump()
1893 jump->flags |= IS_MOVABLE; in sljit_emit_jump()
1903 jump->flags |= IS_JAL; in sljit_emit_jump()
1937 sljit_s32 flags; in sljit_emit_cmp() local
1947 flags = ((type & SLJIT_I32_OP) ? INT_DATA : WORD_DATA) | LOAD_DATA; in sljit_emit_cmp()
1949 PTR_FAIL_IF(emit_op_mem2(compiler, flags, DR(TMP_REG1), src1, src1w, src2, src2w)); in sljit_emit_cmp()
1953 PTR_FAIL_IF(emit_op_mem2(compiler, flags, DR(TMP_REG2), src2, src2w, 0, 0)); in sljit_emit_cmp()
1965 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
1967 jump->flags |= IS_MOVABLE; in sljit_emit_cmp()
1977 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
1981 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
1985 jump->flags |= IS_BIT16_COND; in sljit_emit_cmp()
1989 jump->flags |= IS_BIT16_COND; in sljit_emit_cmp()
1999 jump->flags |= IS_BIT16_COND; in sljit_emit_cmp()
2003 jump->flags |= IS_BIT16_COND; in sljit_emit_cmp()
2007 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
2011 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
2039 jump->flags |= IS_BIT26_COND; in sljit_emit_cmp()
2077 jump->flags |= IS_MOVABLE; in sljit_emit_ijump()