Lines Matching refs:op
778 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op,… in sljit_emit_return() argument
783 CHECK(check_sljit_emit_return(compiler, op, src, srcw)); in sljit_emit_return()
785 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
1060 static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 input_flags, in emit_op() argument
1079 if (op >= SLJIT_MOV && op <= SLJIT_MOV_P) in emit_op()
1102 if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOV_P) in emit_op()
1114 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
1122 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in sljit_emit_op0() argument
1125 sljit_s32 int_op = op & SLJIT_I32_OP; in sljit_emit_op0()
1129 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
1131 op = GET_OPCODE(op); in sljit_emit_op0()
1132 switch (op) { in sljit_emit_op0()
1141 …return push_inst(compiler, (op == SLJIT_LMUL_UW ? MULHDU : MULHD) | D(SLJIT_R1) | A(TMP_REG1) | B(… in sljit_emit_op0()
1144 …return push_inst(compiler, (op == SLJIT_LMUL_UW ? MULHWU : MULHW) | D(SLJIT_R1) | A(TMP_REG1) | B(… in sljit_emit_op0()
1150 …FAIL_IF(push_inst(compiler, (int_op ? (op == SLJIT_DIVMOD_UW ? DIVWU : DIVW) : (op == SLJIT_DIVMOD… in sljit_emit_op0()
1153 …FAIL_IF(push_inst(compiler, (op == SLJIT_DIVMOD_UW ? DIVWU : DIVW) | D(SLJIT_R0) | A(SLJIT_R0) | B… in sljit_emit_op0()
1160 …return push_inst(compiler, (int_op ? (op == SLJIT_DIV_UW ? DIVWU : DIVW) : (op == SLJIT_DIV_UW ? D… in sljit_emit_op0()
1162 …return push_inst(compiler, (op == SLJIT_DIV_UW ? DIVWU : DIVW) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJ… in sljit_emit_op0()
1200 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op1() argument
1204 sljit_s32 flags = HAS_FLAGS(op) ? ALT_SET_FLAGS : 0; in sljit_emit_op1()
1205 sljit_s32 op_flags = GET_ALL_FLAGS(op); in sljit_emit_op1()
1208 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1212 op = GET_OPCODE(op); in sljit_emit_op1()
1219 if (op < SLJIT_NOT && FAST_IS_REG(src) && src == dst) { in sljit_emit_op1()
1220 if (!TYPE_CAST_NEEDED(op)) in sljit_emit_op1()
1226 if (op < SLJIT_NOT) { in sljit_emit_op1()
1228 if (op == SLJIT_MOV_S32) in sljit_emit_op1()
1229 op = SLJIT_MOV_U32; in sljit_emit_op1()
1232 if (op == SLJIT_MOV_U32) in sljit_emit_op1()
1233 op = SLJIT_MOV_S32; in sljit_emit_op1()
1245 switch (op) { in sljit_emit_op1()
1326 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2() argument
1331 sljit_s32 flags = HAS_FLAGS(op) ? ALT_SET_FLAGS : 0; in sljit_emit_op2()
1334 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1339 if (dst == SLJIT_UNUSED && !HAS_FLAGS(op)) in sljit_emit_op2()
1348 if (op & SLJIT_I32_OP) { in sljit_emit_op2()
1355 if (HAS_FLAGS(op)) in sljit_emit_op2()
1359 if (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW) in sljit_emit_op2()
1362 switch (GET_OPCODE(op)) { in sljit_emit_op2()
1364 if (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW) in sljit_emit_op2()
1367 if (!HAS_FLAGS(op) && ((src1 | src2) & SLJIT_IMM)) { in sljit_emit_op2()
1394 if (HAS_FLAGS(op)) { in sljit_emit_op2()
1404 …return emit_op(compiler, SLJIT_ADD, flags | ((GET_FLAG_TYPE(op) == GET_FLAG_TYPE(SLJIT_SET_CARRY))… in sljit_emit_op2()
1410 if (GET_FLAG_TYPE(op) >= SLJIT_LESS && GET_FLAG_TYPE(op) <= SLJIT_LESS_EQUAL) { in sljit_emit_op2()
1426 if (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW) in sljit_emit_op2()
1429 if (!HAS_FLAGS(op) && ((src1 | src2) & SLJIT_IMM)) { in sljit_emit_op2()
1449 if (dst == SLJIT_UNUSED && GET_FLAG_TYPE(op) != GET_FLAG_TYPE(SLJIT_SET_CARRY)) { in sljit_emit_op2()
1462 …return emit_op(compiler, SLJIT_SUB, flags | ((GET_FLAG_TYPE(op) == GET_FLAG_TYPE(SLJIT_SET_CARRY))… in sljit_emit_op2()
1469 if (op & SLJIT_I32_OP) in sljit_emit_op2()
1472 if (!HAS_FLAGS(op)) { in sljit_emit_op2()
1490 if (!HAS_FLAGS(op) || GET_OPCODE(op) == SLJIT_AND) { in sljit_emit_op2()
1493 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1497 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0); in sljit_emit_op2()
1501 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1505 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0); in sljit_emit_op2()
1508 if (GET_OPCODE(op) != SLJIT_AND && GET_OPCODE(op) != SLJIT_AND) { in sljit_emit_op2()
1512 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1516 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0); in sljit_emit_op2()
1519 return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1525 if (op & SLJIT_I32_OP) in sljit_emit_op2()
1530 return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1532 return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1538 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_src() argument
1542 CHECK(check_sljit_emit_op_src(compiler, op, src, srcw)); in sljit_emit_op_src()
1545 switch (op) { in sljit_emit_op_src()
1592 #define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_F32_OP) >> 6)) argument
1593 #define SELECT_FOP(op, single, double) ((op & SLJIT_F32_OP) ? single : double) argument
1610 …IT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1_conv_sw_from_f64() argument
1616 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src, srcw, TMP_REG1)); in sljit_emit_fop1_conv_sw_from_f64()
1621 op = GET_OPCODE(op); in sljit_emit_fop1_conv_sw_from_f64()
1622 …FAIL_IF(push_inst(compiler, (op == SLJIT_CONV_S32_FROM_F64 ? FCTIWZ : FCTIDZ) | FD(TMP_FREG1) | FB… in sljit_emit_fop1_conv_sw_from_f64()
1624 if (op == SLJIT_CONV_SW_FROM_F64) { in sljit_emit_fop1_conv_sw_from_f64()
1671 …IT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1_conv_f64_from_sw() argument
1680 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32) in sljit_emit_fop1_conv_f64_from_sw()
1685 else if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32) { in sljit_emit_fop1_conv_f64_from_sw()
1703 return emit_op_mem(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, TMP_REG1); in sljit_emit_fop1_conv_f64_from_sw()
1704 if (op & SLJIT_F32_OP) in sljit_emit_fop1_conv_f64_from_sw()
1741 return emit_op_mem(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, TMP_REG1); in sljit_emit_fop1_conv_f64_from_sw()
1742 if (op & SLJIT_F32_OP) in sljit_emit_fop1_conv_f64_from_sw()
1749 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1_cmp() argument
1754 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, TMP_REG1)); in sljit_emit_fop1_cmp()
1759 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, TMP_REG2)); in sljit_emit_fop1_cmp()
1766 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1() argument
1775 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1777 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) in sljit_emit_fop1()
1778 op ^= SLJIT_F32_OP; in sljit_emit_fop1()
1783 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, TMP_REG1)); in sljit_emit_fop1()
1787 switch (GET_OPCODE(op)) { in sljit_emit_fop1()
1789 op ^= SLJIT_F32_OP; in sljit_emit_fop1()
1790 if (op & SLJIT_F32_OP) { in sljit_emit_fop1()
1812 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op), dst_r, dst, dstw, TMP_REG1)); in sljit_emit_fop1()
1816 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop2() argument
1824 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1832 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, TMP_REG1)); in sljit_emit_fop2()
1837 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, TMP_REG2)); in sljit_emit_fop2()
1841 switch (GET_OPCODE(op)) { in sljit_emit_fop2()
1843 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FADDS, FADD) | FD(dst_r) | FA(src1) | FB(src2))); in sljit_emit_fop2()
1847 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSUBS, FSUB) | FD(dst_r) | FA(src1) | FB(src2))); in sljit_emit_fop2()
1851 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FMULS, FMUL) | FD(dst_r) | FA(src1) | FC(src2) /* FMUL … in sljit_emit_fop2()
1855 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FDIVS, FDIV) | FD(dst_r) | FA(src1) | FB(src2))); in sljit_emit_fop2()
1860 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, TMP_REG1)); in sljit_emit_fop2()
2087 …JIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_flags() argument
2092 sljit_s32 saved_op = op; in sljit_emit_op_flags()
2096 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2100 input_flags = (op & SLJIT_I32_OP) ? INT_DATA : WORD_DATA; in sljit_emit_op_flags()
2105 op = GET_OPCODE(op); in sljit_emit_op_flags()
2106 reg = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2; in sljit_emit_op_flags()
2108 if (op >= SLJIT_ADD && (dst & SLJIT_MEM)) in sljit_emit_op_flags()
2202 if (op < SLJIT_ADD) { in sljit_emit_op_flags()