Lines Matching refs:op

750 #define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_32) >> 6))  argument
1245 static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 input_flags, in emit_op() argument
1266 if (op >= SLJIT_MOV && op <= SLJIT_MOV_P) in emit_op()
1292 if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOV_P) in emit_op()
1307 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
1315 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in sljit_emit_op0() argument
1318 sljit_s32 int_op = op & SLJIT_32; in sljit_emit_op0()
1322 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
1324 op = GET_OPCODE(op); in sljit_emit_op0()
1325 switch (op) { in sljit_emit_op0()
1334 …return push_inst(compiler, (op == SLJIT_LMUL_UW ? MULHDU : MULHD) | D(SLJIT_R1) | A(TMP_REG1) | B(… in sljit_emit_op0()
1337 …return push_inst(compiler, (op == SLJIT_LMUL_UW ? MULHWU : MULHW) | D(SLJIT_R1) | A(TMP_REG1) | B(… in sljit_emit_op0()
1343 …FAIL_IF(push_inst(compiler, (int_op ? (op == SLJIT_DIVMOD_UW ? DIVWU : DIVW) : (op == SLJIT_DIVMOD… in sljit_emit_op0()
1346 …FAIL_IF(push_inst(compiler, (op == SLJIT_DIVMOD_UW ? DIVWU : DIVW) | D(SLJIT_R0) | A(SLJIT_R0) | B… in sljit_emit_op0()
1353 …return push_inst(compiler, (int_op ? (op == SLJIT_DIV_UW ? DIVWU : DIVW) : (op == SLJIT_DIV_UW ? D… in sljit_emit_op0()
1355 …return push_inst(compiler, (op == SLJIT_DIV_UW ? DIVWU : DIVW) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJ… in sljit_emit_op0()
1365 static sljit_s32 emit_rev(struct sljit_compiler *compiler, sljit_s32 op, in emit_rev() argument
1372 sljit_s32 is_32 = op & SLJIT_32; in emit_rev()
1374 op = GET_OPCODE(op); in emit_rev()
1379 if (op == SLJIT_REV_U16 || op == SLJIT_REV_S16) { in emit_rev()
1388 if (op == SLJIT_REV_U16) in emit_rev()
1413 if (op == SLJIT_REV_S32) in emit_rev()
1429 if (op != SLJIT_REV_U16 && op != SLJIT_REV_S16) { in emit_rev()
1466 if (op == SLJIT_REV_U16 || op == SLJIT_REV_S16) { in emit_rev()
1472 if (op == SLJIT_REV_U16) in emit_rev()
1512 if (op == SLJIT_REV_S32) in emit_rev()
1521 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op1() argument
1525 sljit_s32 flags = HAS_FLAGS(op) ? ALT_SET_FLAGS : 0; in sljit_emit_op1()
1526 sljit_s32 op_flags = GET_ALL_FLAGS(op); in sljit_emit_op1()
1529 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1533 op = GET_OPCODE(op); in sljit_emit_op1()
1538 if (op <= SLJIT_MOV_P && FAST_IS_REG(src) && src == dst) { in sljit_emit_op1()
1539 if (!TYPE_CAST_NEEDED(op)) in sljit_emit_op1()
1545 if (op <= SLJIT_MOV_P) { in sljit_emit_op1()
1547 if (op == SLJIT_MOV_S32) in sljit_emit_op1()
1548 op = SLJIT_MOV_U32; in sljit_emit_op1()
1551 if (op == SLJIT_MOV_U32) in sljit_emit_op1()
1552 op = SLJIT_MOV_S32; in sljit_emit_op1()
1564 switch (op) { in sljit_emit_op1()
1601 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1605 op |= SLJIT_32; in sljit_emit_op1()
1612 op |= (op_flags & SLJIT_32); in sljit_emit_op1()
1614 return emit_rev(compiler, op, dst, dstw, src, srcw); in sljit_emit_op1()
1638 #define TEST_ADD_FORM1(op) \ argument
1639 (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW \
1640 …|| (op & (SLJIT_32 | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == (SLJIT_32 | SLJIT_SET_Z | SLJIT_SET_CAR…
1641 #define TEST_SUB_FORM2(op) \ argument
1642 ((GET_FLAG_TYPE(op) >= SLJIT_SIG_LESS && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL) \
1643 || (op & (SLJIT_32 | SLJIT_SET_Z | VARIABLE_FLAG_MASK)) == (SLJIT_32 | SLJIT_SET_Z))
1644 #define TEST_SUB_FORM3(op) \ argument
1645 (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW \
1646 || (op & (SLJIT_32 | SLJIT_SET_Z)) == (SLJIT_32 | SLJIT_SET_Z))
1656 #define TEST_ADD_FORM1(op) \ argument
1657 (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW)
1658 #define TEST_SUB_FORM2(op) \ argument
1659 (GET_FLAG_TYPE(op) >= SLJIT_SIG_LESS && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL)
1660 #define TEST_SUB_FORM3(op) \ argument
1661 (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW)
1664 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2() argument
1669 sljit_s32 flags = HAS_FLAGS(op) ? ALT_SET_FLAGS : 0; in sljit_emit_op2()
1672 CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1678 if (op & SLJIT_32) { in sljit_emit_op2()
1685 if (HAS_FLAGS(op)) in sljit_emit_op2()
1689 if (GET_FLAG_TYPE(op) == SLJIT_OVERFLOW) in sljit_emit_op2()
1692 switch (GET_OPCODE(op)) { in sljit_emit_op2()
1696 if (TEST_ADD_FORM1(op)) in sljit_emit_op2()
1699 if (!HAS_FLAGS(op) && (src1 == SLJIT_IMM || src2 == SLJIT_IMM)) { in sljit_emit_op2()
1728 if ((op & (SLJIT_32 | SLJIT_SET_Z)) == (SLJIT_32 | SLJIT_SET_Z)) { in sljit_emit_op2()
1740 if (HAS_FLAGS(op)) { in sljit_emit_op2()
1750 …return emit_op(compiler, SLJIT_ADD, flags | ((GET_FLAG_TYPE(op) == SLJIT_CARRY) ? ALT_FORM5 : 0), … in sljit_emit_op2()
1759 if (GET_FLAG_TYPE(op) >= SLJIT_LESS && GET_FLAG_TYPE(op) <= SLJIT_LESS_EQUAL) { in sljit_emit_op2()
1775 if (dst == TMP_REG2 && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL) { in sljit_emit_op2()
1783 if (TEST_SUB_FORM2(op)) { in sljit_emit_op2()
1791 if (TEST_SUB_FORM3(op)) in sljit_emit_op2()
1796 …return emit_op(compiler, SLJIT_ADD, flags | (!HAS_FLAGS(op) ? ALT_FORM2 : ALT_FORM3), dst, dstw, s… in sljit_emit_op2()
1799 if (TEST_SL_IMM(src1, src1w) && !(op & SLJIT_SET_Z)) { in sljit_emit_op2()
1804 if (!HAS_FLAGS(op)) { in sljit_emit_op2()
1817 …return emit_op(compiler, SLJIT_SUB, flags | ((GET_FLAG_TYPE(op) == SLJIT_CARRY) ? ALT_FORM5 : 0), … in sljit_emit_op2()
1825 if (op & SLJIT_32) in sljit_emit_op2()
1828 if (!HAS_FLAGS(op)) { in sljit_emit_op2()
1844 return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM4, dst, dstw, TMP_REG1, 0, src1, src1w); in sljit_emit_op2()
1847 return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM4, dst, dstw, TMP_REG1, 0, src2, src2w); in sljit_emit_op2()
1853 if (!HAS_FLAGS(op) || GET_OPCODE(op) == SLJIT_AND) { in sljit_emit_op2()
1856 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1860 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0); in sljit_emit_op2()
1864 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1868 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0); in sljit_emit_op2()
1871 if (!HAS_FLAGS(op) && GET_OPCODE(op) != SLJIT_AND) { in sljit_emit_op2()
1875 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1879 … return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0); in sljit_emit_op2()
1882 return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1893 if (op & SLJIT_32) in sljit_emit_op2()
1898 return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0); in sljit_emit_op2()
1900 return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1906 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2u() argument
1911 CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); in sljit_emit_op2u()
1914 return sljit_emit_op2(compiler, op, TMP_REG2, 0, src1, src1w, src2, src2w); in sljit_emit_op2u()
1921 …T_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_shift_into(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_shift_into() argument
1929 sljit_s32 inp_flags = ((op & SLJIT_32) ? INT_DATA : WORD_DATA) | LOAD_DATA; in sljit_emit_shift_into()
1930 sljit_sw bit_length = (op & SLJIT_32) ? 32 : 64; in sljit_emit_shift_into()
1937 CHECK(check_sljit_emit_shift_into(compiler, op, dst_reg, src1_reg, src2_reg, src3, src3w)); in sljit_emit_shift_into()
1939 is_right = (GET_OPCODE(op) == SLJIT_LSHR || GET_OPCODE(op) == SLJIT_MLSHR); in sljit_emit_shift_into()
1943 …return sljit_emit_op2(compiler, (is_right ? SLJIT_ROTR : SLJIT_ROTL) | (op & SLJIT_32), dst_reg, 0… in sljit_emit_shift_into()
1955 if (!(op & SLJIT_32)) { in sljit_emit_shift_into()
1983 if (!(op & SLJIT_32)) { in sljit_emit_shift_into()
1984 if (GET_OPCODE(op) == SLJIT_MSHL || GET_OPCODE(op) == SLJIT_MLSHR || dst_reg == src3) { in sljit_emit_shift_into()
1997 if (GET_OPCODE(op) == SLJIT_MSHL || GET_OPCODE(op) == SLJIT_MLSHR || dst_reg == src3) { in sljit_emit_shift_into()
2030 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_src() argument
2034 CHECK(check_sljit_emit_op_src(compiler, op, src, srcw)); in sljit_emit_op_src()
2037 switch (op) { in sljit_emit_op_src()
2059 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_dst(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_dst() argument
2065 CHECK(check_sljit_emit_op_dst(compiler, op, dst, dstw)); in sljit_emit_op_dst()
2068 switch (op) { in sljit_emit_op_dst()
2115 #define SELECT_FOP(op, single, double) ((sljit_ins)((op & SLJIT_32) ? single : double)) argument
2117 …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
2123 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()
2128 op = GET_OPCODE(op); in sljit_emit_fop1_conv_sw_from_f64()
2129 …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()
2131 if (op == SLJIT_CONV_SW_FROM_F64) { in sljit_emit_fop1_conv_sw_from_f64()
2172 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1_cmp() argument
2177 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, TMP_REG1)); in sljit_emit_fop1_cmp()
2182 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, TMP_REG2)); in sljit_emit_fop1_cmp()
2188 switch (GET_FLAG_TYPE(op)) { in sljit_emit_fop1_cmp()
2200 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1() argument
2209 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
2211 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) in sljit_emit_fop1()
2212 op ^= SLJIT_32; in sljit_emit_fop1()
2217 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, TMP_REG1)); in sljit_emit_fop1()
2221 switch (GET_OPCODE(op)) { in sljit_emit_fop1()
2223 op ^= SLJIT_32; in sljit_emit_fop1()
2224 if (op & SLJIT_32) { in sljit_emit_fop1()
2246 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op), dst_r, dst, dstw, TMP_REG1)); in sljit_emit_fop1()
2250 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop2() argument
2258 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2266 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, TMP_REG1)); in sljit_emit_fop2()
2271 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, TMP_REG2)); in sljit_emit_fop2()
2275 switch (GET_OPCODE(op)) { in sljit_emit_fop2()
2277 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FADDS, FADD) | FD(dst_r) | FA(src1) | FB(src2))); in sljit_emit_fop2()
2280 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSUBS, FSUB) | FD(dst_r) | FA(src1) | FB(src2))); in sljit_emit_fop2()
2283 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FMULS, FMUL) | FD(dst_r) | FA(src1) | FC(src2) /* FMUL … in sljit_emit_fop2()
2286 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FDIVS, FDIV) | FD(dst_r) | FA(src1) | FB(src2))); in sljit_emit_fop2()
2289 …FAIL_IF(push_inst(compiler, ((op & SLJIT_32) ? STFS : STFD) | FS(src2) | A(SLJIT_SP) | TMP_MEM_OFF… in sljit_emit_fop2()
2291 …FAIL_IF(push_inst(compiler, LWZ | S(TMP_REG1) | A(SLJIT_SP) | ((op & SLJIT_32) ? TMP_MEM_OFFSET : … in sljit_emit_fop2()
2293 …FAIL_IF(push_inst(compiler, ((op & SLJIT_32) ? LWZ : LD) | S(TMP_REG1) | A(SLJIT_SP) | TMP_MEM_OFF… in sljit_emit_fop2()
2299 FAIL_IF(push_inst(compiler, CMPI | CRD(0 | ((op & SLJIT_32) ? 0 : 1)) | A(TMP_REG1) | 0)); in sljit_emit_fop2()
2306 FAIL_IF(emit_op_mem(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, TMP_REG1)); in sljit_emit_fop2()
2572 …JIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_flags() argument
2578 sljit_s32 saved_op = op; in sljit_emit_op_flags()
2581 sljit_s32 input_flags = ((op & SLJIT_32) || op == SLJIT_MOV32) ? INT_DATA : WORD_DATA; in sljit_emit_op_flags()
2587 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2590 op = GET_OPCODE(op); in sljit_emit_op_flags()
2591 reg = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2; in sljit_emit_op_flags()
2593 if (op >= SLJIT_ADD && (dst & SLJIT_MEM)) in sljit_emit_op_flags()
2713 if (op < SLJIT_ADD) { in sljit_emit_op_flags()