Lines Matching refs:op

722 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op)  in sljit_emit_op0()  argument
730 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
732 switch (GET_OPCODE(op)) { in sljit_emit_op0()
766 compiler->mode32 = op & SLJIT_INT_OP; in sljit_emit_op0()
770 op = GET_OPCODE(op); in sljit_emit_op0()
771 if ((op | 0x2) == SLJIT_UDIVI) { in sljit_emit_op0()
782 if ((op | 0x2) == SLJIT_SDIVI) { in sljit_emit_op0()
813 *inst = MOD_REG | ((op >= SLJIT_UDIVMOD) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]); in sljit_emit_op0()
816 size = (!compiler->mode32 || op >= SLJIT_UDIVMOD) ? 3 : 2; in sljit_emit_op0()
825 *inst++ = REX_W | ((op >= SLJIT_UDIVMOD) ? REX_B : 0); in sljit_emit_op0()
826 else if (op >= SLJIT_UDIVMOD) in sljit_emit_op0()
829 *inst = MOD_REG | ((op >= SLJIT_UDIVMOD) ? reg_lmap[TMP_REG1] : reg_lmap[SLJIT_R1]); in sljit_emit_op0()
837 switch (op) { in sljit_emit_op0()
854 if (op <= SLJIT_SDIVMOD) in sljit_emit_op0()
857 if (op >= SLJIT_UDIVI) in sljit_emit_op0()
1258 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op1() argument
1264 sljit_si op_flags = GET_ALL_FLAGS(op); in sljit_emit_op1()
1273 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1283 op = GET_OPCODE(op); in sljit_emit_op1()
1284 if (op >= SLJIT_MOV && op <= SLJIT_MOVU_P) { in sljit_emit_op1()
1291 if (!TYPE_CAST_NEEDED(op)) in sljit_emit_op1()
1295 if (op == SLJIT_MOV_SI && (src & SLJIT_MEM)) in sljit_emit_op1()
1296 op = SLJIT_MOV_UI; in sljit_emit_op1()
1297 if (op == SLJIT_MOVU_SI && (src & SLJIT_MEM)) in sljit_emit_op1()
1298 op = SLJIT_MOVU_UI; in sljit_emit_op1()
1299 if (op == SLJIT_MOV_UI && (src & SLJIT_IMM)) in sljit_emit_op1()
1300 op = SLJIT_MOV_SI; in sljit_emit_op1()
1301 if (op == SLJIT_MOVU_UI && (src & SLJIT_IMM)) in sljit_emit_op1()
1302 op = SLJIT_MOVU_SI; in sljit_emit_op1()
1307 if (op >= SLJIT_MOVU) { in sljit_emit_op1()
1309 op -= 8; in sljit_emit_op1()
1313 switch (op) { in sljit_emit_op1()
1350 …if (SLJIT_UNLIKELY(dst_is_ereg) && (!(op == SLJIT_MOV || op == SLJIT_MOV_UI || op == SLJIT_MOV_SI … in sljit_emit_op1()
1356 switch (op) { in sljit_emit_op1()
1403 switch (op) { in sljit_emit_op1()
2129 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op, argument
2135 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
2144 compiler->mode32 = op & SLJIT_INT_OP;
2147 if (GET_OPCODE(op) >= SLJIT_MUL) {
2148 if (SLJIT_UNLIKELY(GET_FLAGS(op)))
2150 else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
2154 switch (GET_OPCODE(op)) {
2156 if (!GET_FLAGS(op)) {
2157 …if (emit_lea_binary(compiler, op & SLJIT_KEEP_FLAGS, dst, dstw, src1, src1w, src2, src2w) != SLJIT…
2162 if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
2169 else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS))
2171 if (SLJIT_UNLIKELY(GET_FLAGS(op)))
2176 if (!GET_FLAGS(op)) {
2177 …if ((src2 & SLJIT_IMM) && emit_lea_binary(compiler, op & SLJIT_KEEP_FLAGS, dst, dstw, src1, src1w,…
2182 if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
2191 else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS))
2193 if (SLJIT_UNLIKELY(GET_FLAGS(op)))
2211 return emit_shift_with_flags(compiler, SHL, GET_FLAGS(op),
2214 return emit_shift_with_flags(compiler, SHR, GET_FLAGS(op),
2217 return emit_shift_with_flags(compiler, SAR, GET_FLAGS(op),
2325 …tic SLJIT_INLINE sljit_si sljit_emit_fop1_convw_fromd(struct sljit_compiler *compiler, sljit_si op, argument
2333 if (GET_OPCODE(op) == SLJIT_CONVW_FROMD)
2337 …inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_SINGLE_OP) ? EX86_PREF_F3 : EX86_PREF_F2) |…
2347 …tic SLJIT_INLINE sljit_si sljit_emit_fop1_convd_fromw(struct sljit_compiler *compiler, sljit_si op, argument
2355 if (GET_OPCODE(op) == SLJIT_CONVD_FROMW)
2361 if (GET_OPCODE(op) == SLJIT_CONVD_FROMI)
2369 …inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_SINGLE_OP) ? EX86_PREF_F3 : EX86_PREF_F2) |…
2378 return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
2382 static SLJIT_INLINE sljit_si sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_si op, argument
2388 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, TMP_FREG, src1, src1w));
2391 return emit_sse2_logic(compiler, UCOMISD_x_xm, !(op & SLJIT_SINGLE_OP), src1, src2, src2w);
2394 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op, argument
2405 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
2407 if (GET_OPCODE(op) == SLJIT_DMOV) {
2409 return emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst, src, srcw);
2411 return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, src);
2412 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, TMP_FREG, src, srcw));
2413 return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
2416 if (GET_OPCODE(op) == SLJIT_CONVD_FROMS) {
2422 FAIL_IF(emit_sse2_logic(compiler, UNPCKLPD_x_xm, op & SLJIT_SINGLE_OP, src, src, 0));
2425 FAIL_IF(emit_sse2_load(compiler, !(op & SLJIT_SINGLE_OP), TMP_FREG, src, srcw));
2429 FAIL_IF(emit_sse2_logic(compiler, CVTPD2PS_x_xm, op & SLJIT_SINGLE_OP, dst_r, src, 0));
2431 return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
2438 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst_r, src, srcw));
2442 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst_r, src, srcw));
2445 switch (GET_OPCODE(op)) {
2447 …FAIL_IF(emit_sse2_logic(compiler, XORPD_x_xm, 1, dst_r, SLJIT_MEM0(), (sljit_sw)(op & SLJIT_SINGLE…
2451 …FAIL_IF(emit_sse2_logic(compiler, ANDPD_x_xm, 1, dst_r, SLJIT_MEM0(), (sljit_sw)(op & SLJIT_SINGLE…
2456 return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
2460 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op, argument
2468 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
2481 else if (dst == src2 && (op == SLJIT_DADD || op == SLJIT_DMUL)) {
2487 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst_r, src1, src1w));
2490 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, TMP_FREG, src1, src1w));
2495 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, TMP_FREG, src1, src1w));
2498 switch (GET_OPCODE(op)) {
2500 FAIL_IF(emit_sse2(compiler, ADDSD_x_xm, op & SLJIT_SINGLE_OP, dst_r, src2, src2w));
2504 FAIL_IF(emit_sse2(compiler, SUBSD_x_xm, op & SLJIT_SINGLE_OP, dst_r, src2, src2w));
2508 FAIL_IF(emit_sse2(compiler, MULSD_x_xm, op & SLJIT_SINGLE_OP, dst_r, src2, src2w));
2512 FAIL_IF(emit_sse2(compiler, DIVSD_x_xm, op & SLJIT_SINGLE_OP, dst_r, src2, src2w));
2517 return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
2660 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op, argument
2676 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
2685 FAIL_IF(emit_restore_flags(compiler, op & SLJIT_KEEP_FLAGS));
2692 if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst) && dst == src) {
2707 reg = (op == SLJIT_MOV && FAST_IS_REG(dst)) ? dst : TMP_REG1;
2725 if (GET_OPCODE(op) < SLJIT_ADD) {
2726 compiler->mode32 = GET_OPCODE(op) != SLJIT_MOV;
2733 return sljit_emit_op2(compiler, op, dst, dstw, dst, dstw, TMP_REG1, 0);
2735 if (GET_OPCODE(op) < SLJIT_ADD && FAST_IS_REG(dst)) {
2788 …if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst) && dst == src && reg_map[…
2837 if (GET_OPCODE(op) < SLJIT_ADD)
2844 return sljit_emit_op2(compiler, op, dst_save, dstw_save, dst_save, dstw_save, TMP_REG1, 0);