Lines Matching refs:op
797 #define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_32) >> 6)) argument
1294 static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 input_flags, in emit_op() argument
1305 …sljit_s32 src2_tmp_reg = (!(input_flags & ALT_SIGN_EXT) && GET_OPCODE(op) >= SLJIT_OP2_BASE && FAS… in emit_op()
1315 if (op >= SLJIT_MOV && op <= SLJIT_MOV_P) in emit_op()
1324 if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOV_P) in emit_op()
1352 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
1360 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in sljit_emit_op0() argument
1363 sljit_s32 int_op = op & SLJIT_32; in sljit_emit_op0()
1367 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
1369 op = GET_OPCODE(op); in sljit_emit_op0()
1370 switch (op) { in sljit_emit_op0()
1379 …return push_inst(compiler, (op == SLJIT_LMUL_UW ? MULHDU : MULHD) | D(SLJIT_R1) | A(TMP_REG1) | B(… in sljit_emit_op0()
1382 …return push_inst(compiler, (op == SLJIT_LMUL_UW ? MULHWU : MULHW) | D(SLJIT_R1) | A(TMP_REG1) | B(… in sljit_emit_op0()
1388 …FAIL_IF(push_inst(compiler, (int_op ? (op == SLJIT_DIVMOD_UW ? DIVWU : DIVW) : (op == SLJIT_DIVMOD… in sljit_emit_op0()
1391 …FAIL_IF(push_inst(compiler, (op == SLJIT_DIVMOD_UW ? DIVWU : DIVW) | D(SLJIT_R0) | A(SLJIT_R0) | B… in sljit_emit_op0()
1398 …return push_inst(compiler, (int_op ? (op == SLJIT_DIV_UW ? DIVWU : DIVW) : (op == SLJIT_DIV_UW ? D… in sljit_emit_op0()
1400 …return push_inst(compiler, (op == SLJIT_DIV_UW ? DIVWU : DIVW) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJ… in sljit_emit_op0()
1410 static sljit_s32 emit_rev(struct sljit_compiler *compiler, sljit_s32 op, in emit_rev() argument
1417 sljit_s32 is_32 = op & SLJIT_32; in emit_rev()
1419 op = GET_OPCODE(op); in emit_rev()
1424 if (op == SLJIT_REV_U16 || op == SLJIT_REV_S16) { in emit_rev()
1433 if (op == SLJIT_REV_U16) in emit_rev()
1458 if (op == SLJIT_REV_S32) in emit_rev()
1474 if (op != SLJIT_REV_U16 && op != SLJIT_REV_S16) { in emit_rev()
1511 if (op == SLJIT_REV_U16 || op == SLJIT_REV_S16) { in emit_rev()
1517 if (op == SLJIT_REV_U16) in emit_rev()
1557 if (op == SLJIT_REV_S32) in emit_rev()
1566 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op1() argument
1570 sljit_s32 flags = HAS_FLAGS(op) ? ALT_SET_FLAGS : 0; in sljit_emit_op1()
1571 sljit_s32 op_flags = GET_ALL_FLAGS(op); in sljit_emit_op1()
1574 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1578 op = GET_OPCODE(op); in sljit_emit_op1()
1583 if (op <= SLJIT_MOV_P && FAST_IS_REG(src) && src == dst) { in sljit_emit_op1()
1584 if (!TYPE_CAST_NEEDED(op)) in sljit_emit_op1()
1590 if (op <= SLJIT_MOV_P) { in sljit_emit_op1()
1592 if (op == SLJIT_MOV_S32) in sljit_emit_op1()
1593 op = SLJIT_MOV_U32; in sljit_emit_op1()
1596 if (op == SLJIT_MOV_U32) in sljit_emit_op1()
1597 op = SLJIT_MOV_S32; in sljit_emit_op1()
1609 switch (op) { in sljit_emit_op1()
1646 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1650 op |= SLJIT_32; in sljit_emit_op1()
1657 op |= (op_flags & SLJIT_32); in sljit_emit_op1()
1659 return emit_rev(compiler, op, dst, dstw, src, srcw); in sljit_emit_op1()
1683 #define TEST_ADD_FORM1(op) \ argument
1684 (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW \
1685 …|| (op & (SLJIT_32 | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == (SLJIT_32 | SLJIT_SET_Z | SLJIT_SET_CAR…
1686 #define TEST_SUB_FORM2(op) \ argument
1687 ((GET_FLAG_TYPE(op) >= SLJIT_SIG_LESS && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL) \
1688 || (op & (SLJIT_32 | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == (SLJIT_32 | SLJIT_SET_Z))
1689 #define TEST_SUB_FORM3(op) \ argument
1690 (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW \
1691 || (op & (SLJIT_32 | SLJIT_SET_Z)) == (SLJIT_32 | SLJIT_SET_Z))
1701 #define TEST_ADD_FORM1(op) \ argument
1702 (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW)
1703 #define TEST_SUB_FORM2(op) \ argument
1704 (GET_FLAG_TYPE(op) >= SLJIT_SIG_LESS && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL)
1705 #define TEST_SUB_FORM3(op) \ argument
1706 (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW)
1709 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2() argument
1714 sljit_s32 flags = HAS_FLAGS(op) ? ALT_SET_FLAGS : 0; in sljit_emit_op2()
1717 CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1723 if (op & SLJIT_32) { in sljit_emit_op2()
1730 if (HAS_FLAGS(op)) in sljit_emit_op2()
1734 if (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW) in sljit_emit_op2()
1737 switch (GET_OPCODE(op)) { in sljit_emit_op2()
1741 if (TEST_ADD_FORM1(op)) in sljit_emit_op2()
1744 if (!HAS_FLAGS(op) && (src1 == SLJIT_IMM || src2 == SLJIT_IMM)) { in sljit_emit_op2()
1773 if ((op & (SLJIT_32 | SLJIT_SET_Z)) == (SLJIT_32 | SLJIT_SET_Z)) { in sljit_emit_op2()
1785 if (HAS_FLAGS(op)) { in sljit_emit_op2()
1795 …return emit_op(compiler, SLJIT_ADD, flags | ((GET_FLAG_TYPE(op) == SLJIT_CARRY) ? ALT_FORM5 : 0), … in sljit_emit_op2()
1804 if (GET_FLAG_TYPE(op) >= SLJIT_LESS && GET_FLAG_TYPE(op) <= SLJIT_LESS_EQUAL) { in sljit_emit_op2()
1820 if (dst == TMP_REG1 && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL) { in sljit_emit_op2()
1828 if (TEST_SUB_FORM2(op)) { in sljit_emit_op2()
1836 if (TEST_SUB_FORM3(op)) in sljit_emit_op2()
1841 …return emit_op(compiler, SLJIT_ADD, flags | (!HAS_FLAGS(op) ? ALT_FORM2 : ALT_FORM3), dst, dstw, s… in sljit_emit_op2()
1844 if (TEST_SL_IMM(src1, src1w) && !(op & SLJIT_SET_Z)) { in sljit_emit_op2()
1849 if (!HAS_FLAGS(op)) { in sljit_emit_op2()
1862 …return emit_op(compiler, SLJIT_SUB, flags | ((GET_FLAG_TYPE(op) == SLJIT_CARRY) ? ALT_FORM5 : 0), … in sljit_emit_op2()
1870 if (op & SLJIT_32) in sljit_emit_op2()
1873 if (!HAS_FLAGS(op)) { in sljit_emit_op2()
1889 return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM4, dst, dstw, TMP_REG1, 0, src1, src1w); in sljit_emit_op2()
1892 return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM4, dst, dstw, TMP_REG1, 0, src2, src2w); in sljit_emit_op2()
1898 if (!HAS_FLAGS(op) || GET_OPCODE(op) == SLJIT_AND) { in sljit_emit_op2()
1901 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1905 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0); in sljit_emit_op2()
1909 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1913 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0); in sljit_emit_op2()
1916 if (!HAS_FLAGS(op) && GET_OPCODE(op) != SLJIT_AND) { in sljit_emit_op2()
1920 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1924 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0); in sljit_emit_op2()
1927 return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1938 if (op & SLJIT_32) in sljit_emit_op2()
1943 return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1945 return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1951 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2u() argument
1956 CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); in sljit_emit_op2u()
1959 return sljit_emit_op2(compiler, op, TMP_REG1, 0, src1, src1w, src2, src2w); in sljit_emit_op2u()
1966 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2r(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2r() argument
1972 CHECK(check_sljit_emit_op2r(compiler, op, dst_reg, src1, src1w, src2, src2w)); in sljit_emit_op2r()
1974 switch (GET_OPCODE(op)) { in sljit_emit_op2r()
1977 …FAIL_IF(sljit_emit_op2(compiler, SLJIT_MUL | (op & SLJIT_32), TMP_REG2, 0, src1, src1w, src2, src2… in sljit_emit_op2r()
1984 …T_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_shift_into(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_shift_into() argument
1992 sljit_s32 inp_flags = ((op & SLJIT_32) ? INT_DATA : WORD_DATA) | LOAD_DATA; in sljit_emit_shift_into()
1993 sljit_sw bit_length = (op & SLJIT_32) ? 32 : 64; in sljit_emit_shift_into()
2000 CHECK(check_sljit_emit_shift_into(compiler, op, dst_reg, src1_reg, src2_reg, src3, src3w)); in sljit_emit_shift_into()
2002 is_right = (GET_OPCODE(op) == SLJIT_LSHR || GET_OPCODE(op) == SLJIT_MLSHR); in sljit_emit_shift_into()
2006 …return sljit_emit_op2(compiler, (is_right ? SLJIT_ROTR : SLJIT_ROTL) | (op & SLJIT_32), dst_reg, 0… in sljit_emit_shift_into()
2018 if (!(op & SLJIT_32)) { in sljit_emit_shift_into()
2046 if (!(op & SLJIT_32)) { in sljit_emit_shift_into()
2047 if (GET_OPCODE(op) == SLJIT_MSHL || GET_OPCODE(op) == SLJIT_MLSHR || dst_reg == src3) { in sljit_emit_shift_into()
2060 if (GET_OPCODE(op) == SLJIT_MSHL || GET_OPCODE(op) == SLJIT_MLSHR || dst_reg == src3) { in sljit_emit_shift_into()
2093 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_src() argument
2097 CHECK(check_sljit_emit_op_src(compiler, op, src, srcw)); in sljit_emit_op_src()
2100 switch (op) { in sljit_emit_op_src()
2122 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_dst(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_dst() argument
2128 CHECK(check_sljit_emit_op_dst(compiler, op, dst, dstw)); in sljit_emit_op_dst()
2131 switch (op) { in sljit_emit_op_dst()
2178 #define SELECT_FOP(op, single, double) ((sljit_ins)((op & SLJIT_32) ? single : double)) argument
2180 …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
2186 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()
2191 op = GET_OPCODE(op); in sljit_emit_fop1_conv_sw_from_f64()
2192 …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()
2194 if (op == SLJIT_CONV_SW_FROM_F64) { in sljit_emit_fop1_conv_sw_from_f64()
2235 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1_cmp() argument
2240 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, TMP_REG1)); in sljit_emit_fop1_cmp()
2245 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, TMP_REG2)); in sljit_emit_fop1_cmp()
2251 switch (GET_FLAG_TYPE(op)) { in sljit_emit_fop1_cmp()
2263 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1() argument
2272 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
2274 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) in sljit_emit_fop1()
2275 op ^= SLJIT_32; in sljit_emit_fop1()
2280 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, TMP_REG1)); in sljit_emit_fop1()
2284 switch (GET_OPCODE(op)) { in sljit_emit_fop1()
2286 op ^= SLJIT_32; in sljit_emit_fop1()
2287 if (op & SLJIT_32) { in sljit_emit_fop1()
2309 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op), dst_r, dst, dstw, TMP_REG1)); in sljit_emit_fop1()
2313 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop2() argument
2321 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2329 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, TMP_REG1)); in sljit_emit_fop2()
2334 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, TMP_REG1)); in sljit_emit_fop2()
2338 switch (GET_OPCODE(op)) { in sljit_emit_fop2()
2340 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FADDS, FADD) | FD(dst_r) | FA(src1) | FB(src2))); in sljit_emit_fop2()
2343 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSUBS, FSUB) | FD(dst_r) | FA(src1) | FB(src2))); in sljit_emit_fop2()
2346 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FMULS, FMUL) | FD(dst_r) | FA(src1) | FC(src2) /* FMUL … in sljit_emit_fop2()
2349 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FDIVS, FDIV) | FD(dst_r) | FA(src1) | FB(src2))); in sljit_emit_fop2()
2352 …FAIL_IF(push_inst(compiler, ((op & SLJIT_32) ? STFS : STFD) | FS(src2) | A(SLJIT_SP) | TMP_MEM_OFF… in sljit_emit_fop2()
2354 …FAIL_IF(push_inst(compiler, LWZ | S(TMP_REG1) | A(SLJIT_SP) | ((op & SLJIT_32) ? TMP_MEM_OFFSET : … in sljit_emit_fop2()
2356 …FAIL_IF(push_inst(compiler, ((op & SLJIT_32) ? LWZ : LD) | S(TMP_REG1) | A(SLJIT_SP) | TMP_MEM_OFF… in sljit_emit_fop2()
2362 FAIL_IF(push_inst(compiler, CMPI | CRD(0 | ((op & SLJIT_32) ? 0 : 1)) | A(TMP_REG1) | 0)); in sljit_emit_fop2()
2369 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, TMP_REG1)); in sljit_emit_fop2()
2639 …JIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_flags() argument
2645 sljit_s32 saved_op = op; in sljit_emit_op_flags()
2648 sljit_s32 input_flags = ((op & SLJIT_32) || op == SLJIT_MOV32) ? INT_DATA : WORD_DATA; in sljit_emit_op_flags()
2654 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2657 op = GET_OPCODE(op); in sljit_emit_op_flags()
2658 reg = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2; in sljit_emit_op_flags()
2660 if (op >= SLJIT_ADD && (dst & SLJIT_MEM)) in sljit_emit_op_flags()
2780 if (op < SLJIT_ADD) { in sljit_emit_op_flags()