Lines Matching refs:flags

107 #define CHECK_FLAGS(list) (!(flags & UNUSED_DEST) || (op & GET_FLAGS(~(list))))
909 if (jump->flags & SLJIT_REWRITABLE_JUMP) in detect_jump_type()
912 if (jump->flags & JUMP_ADDR) in detect_jump_type()
915 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
920 if (jump->flags & IS_COND) in detect_jump_type()
925 jump->flags |= PATCH_B; in detect_jump_type()
927 if (!(jump->flags & IS_COND)) { in detect_jump_type()
928 if (jump->flags & IS_JAL) { in detect_jump_type()
929 jump->flags &= ~(PATCH_B); in detect_jump_type()
930 jump->flags |= PATCH_J; in detect_jump_type()
959 if (jump->flags & IS_COND) { in detect_jump_type()
961 jump->flags |= PATCH_J; in detect_jump_type()
971 jump->flags |= PATCH_J; in detect_jump_type()
973 if (jump->flags & IS_JAL) { in detect_jump_type()
1040 if (jump->flags & IS_JAL) in sljit_generate_code()
1076 addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; in sljit_generate_code()
1079 if (jump->flags & PATCH_B) { in sljit_generate_code()
1091 if (jump->flags & PATCH_J) { in sljit_generate_code()
1103 SLJIT_ASSERT(!(jump->flags & IS_JAL)); in sljit_generate_code()
1288 static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar… in getput_arg_fast() argument
1292 if ((!(flags & WRITE_BACK) || !(arg & REG_MASK)) in getput_arg_fast()
1295 if (SLJIT_UNLIKELY(flags & ARG_TEST)) in getput_arg_fast()
1300 if (flags & LOAD_DATA) in getput_arg_fast()
1301 FAIL_IF(PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, ADDR_TMP_mapped)); in getput_arg_fast()
1303 FAIL_IF(PB2(data_transfer_insts[flags & MEM_MASK], ADDR_TMP_mapped, reg_ar)); in getput_arg_fast()
1340 static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, slj… in getput_arg() argument
1350 if ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) in getput_arg()
1360 if ((flags & WRITE_BACK) && reg_ar == reg_map[base]) { in getput_arg()
1361 SLJIT_ASSERT(!(flags & LOAD_DATA) && reg_map[TMP_REG1] != reg_ar); in getput_arg()
1368 if (!(flags & WRITE_BACK)) { in getput_arg()
1370 if (flags & LOAD_DATA) in getput_arg()
1371 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, TMP_REG3_mapped); in getput_arg()
1373 return PB2(data_transfer_insts[flags & MEM_MASK], TMP_REG3_mapped, reg_ar); in getput_arg()
1381 if (flags & LOAD_DATA) in getput_arg()
1382 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, TMP_REG3_mapped); in getput_arg()
1384 return PB2(data_transfer_insts[flags & MEM_MASK], TMP_REG3_mapped, reg_ar); in getput_arg()
1388 if (flags & LOAD_DATA) in getput_arg()
1389 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, tmp_ar); in getput_arg()
1391 return PB2(data_transfer_insts[flags & MEM_MASK], tmp_ar, reg_ar); in getput_arg()
1396 if (flags & LOAD_DATA) in getput_arg()
1397 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, reg_map[base]); in getput_arg()
1399 return PB2(data_transfer_insts[flags & MEM_MASK], reg_map[base], reg_ar); in getput_arg()
1410 if (!(flags & WRITE_BACK)) { in getput_arg()
1419 if (flags & LOAD_DATA) in getput_arg()
1420 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, tmp_ar); in getput_arg()
1422 return PB2(data_transfer_insts[flags & MEM_MASK], tmp_ar, reg_ar); in getput_arg()
1427 if (flags & LOAD_DATA) in getput_arg()
1428 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, reg_map[base]); in getput_arg()
1430 return PB2(data_transfer_insts[flags & MEM_MASK], reg_map[base], reg_ar); in getput_arg()
1433 if (SLJIT_UNLIKELY(flags & WRITE_BACK) && base) { in getput_arg()
1436 SLJIT_ASSERT(!(flags & LOAD_DATA) && TMP_REG1_mapped != reg_ar); in getput_arg()
1439 if (flags & LOAD_DATA) in getput_arg()
1440 FAIL_IF(PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, ADDR_TMP_mapped)); in getput_arg()
1442 FAIL_IF(PB2(data_transfer_insts[flags & MEM_MASK], ADDR_TMP_mapped, reg_ar)); in getput_arg()
1475 if (flags & LOAD_DATA) in getput_arg()
1476 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, reg_map[base]); in getput_arg()
1478 return PB2(data_transfer_insts[flags & MEM_MASK], reg_map[base], reg_ar); in getput_arg()
1489 if (flags & LOAD_DATA) in getput_arg()
1490 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, TMP_REG3_mapped); in getput_arg()
1492 return PB2(data_transfer_insts[flags & MEM_MASK], TMP_REG3_mapped, reg_ar); in getput_arg()
1508 if (flags & LOAD_DATA) in getput_arg()
1509 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, TMP_REG3_mapped); in getput_arg()
1511 return PB2(data_transfer_insts[flags & MEM_MASK], TMP_REG3_mapped, reg_ar); in getput_arg()
1519 if (flags & LOAD_DATA) in getput_arg()
1520 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, TMP_REG3_mapped); in getput_arg()
1522 return PB2(data_transfer_insts[flags & MEM_MASK], TMP_REG3_mapped, reg_ar); in getput_arg()
1527 if (flags & LOAD_DATA) in getput_arg()
1528 return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, tmp_ar); in getput_arg()
1530 return PB2(data_transfer_insts[flags & MEM_MASK], tmp_ar, reg_ar); in getput_arg()
1533 static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s… in emit_op_mem() argument
1535 if (getput_arg_fast(compiler, flags, reg_ar, arg, argw)) in emit_op_mem()
1540 return getput_arg(compiler, flags, reg_ar, arg, argw, 0, 0); in emit_op_mem()
1543 static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_… in emit_op_mem2() argument
1545 if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) in emit_op_mem2()
1547 return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); in emit_op_mem2()
1567 …2 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, sljit_s32 dst, sl… in emit_single_op() argument
1574 SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); in emit_single_op()
1581 SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); in emit_single_op()
1582 if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) { in emit_single_op()
1596 SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); in emit_single_op()
1597 if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) { in emit_single_op()
1611 SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); in emit_single_op()
1612 if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) { in emit_single_op()
1625 SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); in emit_single_op()
1634 SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM)); in emit_single_op()
1643 if (flags & SRC2_IMM) { in emit_single_op()
1714 if (flags & SRC2_IMM) { in emit_single_op()
1749 if ((flags & SRC2_IMM) && ((op & (SLJIT_SET_U | SLJIT_SET_S)) || src2 == SIMM_16BIT_MIN)) { in emit_single_op()
1752 flags &= ~SRC2_IMM; in emit_single_op()
1755 if (flags & SRC2_IMM) { in emit_single_op()
1826 if ((flags & SRC2_IMM) && src2 == SIMM_16BIT_MIN) { in emit_single_op()
1829 flags &= ~SRC2_IMM; in emit_single_op()
1832 if (flags & SRC2_IMM) { in emit_single_op()
1859 if (flags & SRC2_IMM) { in emit_single_op()
1862 flags &= ~SRC2_IMM; in emit_single_op()
1870 if (flags & SRC2_IMM) { \ in emit_single_op()
1904 if (flags & SRC2_IMM) { \ in emit_single_op()
1941 static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, sljit_s32 … in emit_op() argument
1952 if (!(flags & ALT_KEEP_CACHE)) { in emit_op()
1961 flags |= UNUSED_DEST; in emit_op()
1964 flags |= REG_DEST; in emit_op()
1967 …} else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, TMP_REG1_mapped, dst,… in emit_op()
1968 flags |= SLOW_DEST; in emit_op()
1970 if (flags & IMM_OP) { in emit_op()
1972 if ((!(flags & LOGICAL_OP) in emit_op()
1974 || ((flags & LOGICAL_OP) && !(src2w & ~UIMM_16BIT_MAX))) { in emit_op()
1975 flags |= SRC2_IMM; in emit_op()
1980 if (!(flags & SRC2_IMM) && (flags & CUMULATIVE_OP) && (src1 & SLJIT_IMM) && src1w) { in emit_op()
1981 if ((!(flags & LOGICAL_OP) in emit_op()
1983 || ((flags & LOGICAL_OP) && !(src1w & ~UIMM_16BIT_MAX))) { in emit_op()
1984 flags |= SRC2_IMM; in emit_op()
1999 flags |= REG1_SOURCE; in emit_op()
2007 if (getput_arg_fast(compiler, flags | LOAD_DATA, TMP_REG1_mapped, src1, src1w)) in emit_op()
2010 flags |= SLOW_SRC1; in emit_op()
2017 flags |= REG2_SOURCE; in emit_op()
2018 if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_S32) in emit_op()
2021 if (!(flags & SRC2_IMM)) { in emit_op()
2032 if (getput_arg_fast(compiler, flags | LOAD_DATA, reg_map[sugg_src2_r], src2, src2w)) in emit_op()
2035 flags |= SLOW_SRC2; in emit_op()
2039 if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) { in emit_op()
2042 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2_mapped, src2, src2w, src1, src1w)); in emit_op()
2043 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1_mapped, src1, src1w, dst, dstw)); in emit_op()
2045 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1_mapped, src1, src1w, src2, src2w)); in emit_op()
2046 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2_mapped, src2, src2w, dst, dstw)); in emit_op()
2048 } else if (flags & SLOW_SRC1) in emit_op()
2049 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1_mapped, src1, src1w, dst, dstw)); in emit_op()
2050 else if (flags & SLOW_SRC2) in emit_op()
2051 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, reg_map[sugg_src2_r], src2, src2w, dst, dstw)); in emit_op()
2053 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
2056 if (!(flags & SLOW_DEST)) { in emit_op()
2057 getput_arg_fast(compiler, flags, reg_map[dst_r], dst, dstw); in emit_op()
2061 return getput_arg(compiler, flags, reg_map[dst_r], dst, dstw, 0, 0); in emit_op()
2070 sljit_s32 flags = GET_ALL_FLAGS(op); in sljit_emit_op_flags() local
2138 …return emit_op(compiler, op | flags, mem_type | CUMULATIVE_OP | LOGICAL_OP | IMM_OP | ALT_KEEP_CAC… in sljit_emit_op_flags()
2405 flags = IS_COND;
2409 flags = IS_COND;
2415 sljit_s32 flags = 0; in sljit_emit_jump() local
2472 jump->flags |= flags; in sljit_emit_jump()
2486 jump->flags |= IS_JAL | (type >= SLJIT_CALL0 ? SLJIT_REWRITABLE_JUMP : 0); in sljit_emit_jump()