Lines Matching refs:op

173 #define EX86_SELECT_66(op)	(((op) & SLJIT_32) ? 0 : EX86_PREF_66)  argument
174 #define EX86_SELECT_F2_F3(op) (((op) & SLJIT_32) ? EX86_PREF_F3 : EX86_PREF_F2) argument
961 sljit_uw op,
965 sljit_uw op,
1209 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in sljit_emit_op0() argument
1217 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
1219 switch (GET_OPCODE(op)) { in sljit_emit_op0()
1242 compiler->mode32 = op & SLJIT_32; in sljit_emit_op0()
1246 op = GET_OPCODE(op); in sljit_emit_op0()
1247 if ((op | 0x2) == SLJIT_DIV_UW) { in sljit_emit_op0()
1258 if ((op | 0x2) == SLJIT_DIV_SW) { in sljit_emit_op0()
1282 inst[1] = MOD_REG | ((op >= SLJIT_DIVMOD_UW) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]); in sljit_emit_op0()
1285 size = (!compiler->mode32 || op >= SLJIT_DIVMOD_UW) ? 3 : 2; in sljit_emit_op0()
1294 *inst++ = REX_W | ((op >= SLJIT_DIVMOD_UW) ? REX_B : 0); in sljit_emit_op0()
1295 else if (op >= SLJIT_DIVMOD_UW) in sljit_emit_op0()
1298 inst[1] = MOD_REG | ((op >= SLJIT_DIVMOD_UW) ? reg_lmap[TMP_REG1] : reg_lmap[SLJIT_R1]); in sljit_emit_op0()
1306 switch (op) { in sljit_emit_op0()
1323 if (op <= SLJIT_DIVMOD_SW) in sljit_emit_op0()
1326 if (op >= SLJIT_DIV_UW) in sljit_emit_op0()
1411 static sljit_s32 emit_prefetch(struct sljit_compiler *compiler, sljit_s32 op, in emit_prefetch() argument
1425 if (op == SLJIT_PREFETCH_L1) in emit_prefetch()
1427 else if (op == SLJIT_PREFETCH_L2) in emit_prefetch()
1429 else if (op == SLJIT_PREFETCH_L3) in emit_prefetch()
1587 sljit_s32 op, in emit_bswap() argument
1597 sljit_s32 dst_is_ereg = op & SLJIT_32; in emit_bswap()
1601 if (op == SLJIT_REV_U32 || op == SLJIT_REV_S32) in emit_bswap()
1604 op &= ~SLJIT_32; in emit_bswap()
1609 if (op == SLJIT_REV_U16 || op == SLJIT_REV_S16) in emit_bswap()
1642 if (op == SLJIT_REV_U16 || op == SLJIT_REV_S16) { in emit_bswap()
1651 if (op == SLJIT_REV_U16) in emit_bswap()
1660 op = SLJIT_REV; in emit_bswap()
1662 if (op == SLJIT_REV_U16 || op == SLJIT_REV_S16) in emit_bswap()
1669 if (op == SLJIT_REV_S32) { in emit_bswap()
1680 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op1() argument
1687 sljit_s32 op_flags = GET_ALL_FLAGS(op); in sljit_emit_op1()
1691 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1701 op = GET_OPCODE(op); in sljit_emit_op1()
1703 if (op >= SLJIT_MOV && op <= SLJIT_MOV_P) { in sljit_emit_op1()
1709 if (!TYPE_CAST_NEEDED(op)) in sljit_emit_op1()
1716 if (op == SLJIT_MOV_S32) in sljit_emit_op1()
1717 op = SLJIT_MOV_U32; in sljit_emit_op1()
1720 if (op == SLJIT_MOV_U32) in sljit_emit_op1()
1721 op = SLJIT_MOV_S32; in sljit_emit_op1()
1727 switch (op) { in sljit_emit_op1()
1756 …if (SLJIT_UNLIKELY(dst_is_ereg) && (!(op == SLJIT_MOV || op == SLJIT_MOV_U32 || op == SLJIT_MOV_S3… in sljit_emit_op1()
1762 switch (op) { in sljit_emit_op1()
1806 switch (op) { in sljit_emit_op1()
1809 return emit_clz_ctz(compiler, (op == SLJIT_CLZ), dst, dstw, src, srcw); in sljit_emit_op1()
1817 op |= SLJIT_32; in sljit_emit_op1()
1819 return emit_bswap(compiler, op, dst, dstw, src, srcw); in sljit_emit_op1()
2473 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, argument
2479 CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w));
2488 compiler->mode32 = op & SLJIT_32;
2491 SLJIT_ASSERT(dst != TMP_REG1 || HAS_FLAGS(op));
2493 switch (GET_OPCODE(op)) {
2495 if (!HAS_FLAGS(op)) {
2508 if (!HAS_FLAGS(op)) {
2531 if (!HAS_FLAGS(op)) {
2542 return emit_shift_with_flags(compiler, SHL, HAS_FLAGS(op),
2546 return emit_shift_with_flags(compiler, SHR, HAS_FLAGS(op),
2550 return emit_shift_with_flags(compiler, SAR, HAS_FLAGS(op),
2563 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, argument
2567 sljit_s32 opcode = GET_OPCODE(op);
2570 CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w));
2574 return sljit_emit_op2(compiler, op, TMP_REG1, 0, src1, src1w, src2, src2w);
2583 compiler->mode32 = op & SLJIT_32;
2592 …T_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_shift_into(struct sljit_compiler *compiler, sljit_s32 op, argument
2610 CHECK(check_sljit_emit_shift_into(compiler, op, dst_reg, src1_reg, src2_reg, src3, src3w));
2617 compiler->mode32 = op & SLJIT_32;
2624 src3w &= (op & SLJIT_32) ? 0x1f : 0x3f;
2631 is_left = (GET_OPCODE(op) == SLJIT_SHL || GET_OPCODE(op) == SLJIT_MSHL);
2678 compiler->mode32 = op & SLJIT_32;
2725 compiler->mode32 = op & SLJIT_32;
2766 compiler->mode32 = op & SLJIT_32;
2783 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, argument
2787 CHECK(check_sljit_emit_op_src(compiler, op, src, srcw));
2792 switch (op) {
2804 return emit_prefetch(compiler, op, src, srcw);
2810 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_dst(struct sljit_compiler *compiler, sljit_s32 op, argument
2814 CHECK(check_sljit_emit_op_dst(compiler, op, dst, dstw));
2819 switch (op) {
2888 sljit_uw op, argument
2891 sljit_u8 *inst = emit_x86_instruction(compiler, 2 | (op & ~(sljit_uw)0xff), dst, 0, src, srcw);
2894 inst[1] = op & 0xff;
2899 sljit_uw op, argument
2904 SLJIT_ASSERT((op & EX86_SSE2) && ((op & VEX_OP_0F38) || (op & VEX_OP_0F3A)));
2906 …inst = emit_x86_instruction(compiler, 3 | (op & ~((sljit_uw)0xff | VEX_OP_0F38 | VEX_OP_0F3A)), ds…
2909 inst[1] = U8((op & VEX_OP_0F38) ? 0x38 : 0x3A);
2910 inst[2] = op & 0xff;
2926 …IT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op, argument
2936 if (GET_OPCODE(op) == SLJIT_CONV_SW_FROM_F64)
2940 …FAIL_IF(emit_groupf(compiler, CVTTSD2SI_r_xm | EX86_SELECT_F2_F3(op) | EX86_SSE2_OP2, dst_r, src, …
2947 …IT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op, argument
2956 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_SW)
2962 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32)
2970 …FAIL_IF(emit_groupf(compiler, CVTSI2SD_x_rm | EX86_SELECT_F2_F3(op) | EX86_SSE2_OP1, dst_r, src, s…
2976 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG);
2980 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op, argument
2984 switch (GET_FLAG_TYPE(op)) {
2987 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src1, src1w));
2988 …FAIL_IF(emit_groupf(compiler, CMPS_x_xm | EX86_SELECT_F2_F3(op) | EX86_SSE2, TMP_FREG, src2, src2w…
3002 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src2, src2w));
3006 return emit_groupf(compiler, UCOMISD_x_xm | EX86_SELECT_66(op) | EX86_SSE2, src2, src1, src1w);
3010 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src1, src1w));
3014 return emit_groupf(compiler, UCOMISD_x_xm | EX86_SELECT_66(op) | EX86_SSE2, src1, src2, src2w);
3017 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, argument
3029 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
3031 if (GET_OPCODE(op) == SLJIT_MOV_F64) {
3033 return emit_sse2_load(compiler, op & SLJIT_32, dst, src, srcw);
3035 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, src);
3036 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src, srcw));
3037 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG);
3040 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) {
3046 …FAIL_IF(emit_groupf(compiler, UNPCKLPD_x_xm | ((op & SLJIT_32) ? EX86_PREF_66 : 0) | EX86_SSE2, sr…
3048 FAIL_IF(emit_sse2_load(compiler, !(op & SLJIT_32), TMP_FREG, src, srcw));
3052 …FAIL_IF(emit_groupf(compiler, CVTPD2PS_x_xm | ((op & SLJIT_32) ? EX86_PREF_66 : 0) | EX86_SSE2, ds…
3054 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG);
3062 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src, srcw));
3069 inst[1] = (op & SLJIT_32) ? PSLLD_x_i8 : PSLLQ_x_i8;
3071 if (GET_OPCODE(op) == SLJIT_ABS_F64) {
3076 FAIL_IF(emit_byte(compiler, ((op & SLJIT_32) ? 31 : 63)));
3081 …return emit_groupf(compiler, (GET_OPCODE(op) == SLJIT_NEG_F64 ? XORPD_x_xm : ANDPD_x_xm) | EX86_SS…
3084 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src, srcw));
3086 switch (GET_OPCODE(op)) {
3088 …mit_groupf(compiler, XORPD_x_xm | EX86_SELECT_66(op) | EX86_SSE2, TMP_FREG, SLJIT_MEM0(), (sljit_s…
3092 …mit_groupf(compiler, ANDPD_x_xm | EX86_SELECT_66(op) | EX86_SSE2, TMP_FREG, SLJIT_MEM0(), (sljit_s…
3096 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG);
3099 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, argument
3107 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
3120 else if (dst == src2 && (op == SLJIT_ADD_F64 || op == SLJIT_MUL_F64)) {
3126 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, dst_r, src1, src1w));
3129 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src1, src1w));
3134 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src1, src1w));
3137 switch (GET_OPCODE(op)) {
3139 …FAIL_IF(emit_groupf(compiler, ADDSD_x_xm | EX86_SELECT_F2_F3(op) | EX86_SSE2, dst_r, src2, src2w));
3143 …FAIL_IF(emit_groupf(compiler, SUBSD_x_xm | EX86_SELECT_F2_F3(op) | EX86_SSE2, dst_r, src2, src2w));
3147 …FAIL_IF(emit_groupf(compiler, MULSD_x_xm | EX86_SELECT_F2_F3(op) | EX86_SSE2, dst_r, src2, src2w));
3151 …FAIL_IF(emit_groupf(compiler, DIVSD_x_xm | EX86_SELECT_F2_F3(op) | EX86_SSE2, dst_r, src2, src2w));
3156 return emit_sse2_store(compiler, op & SLJIT_32, dst, dstw, TMP_FREG);
3160 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2r(struct sljit_compiler *compiler, sljit_s32 op, argument
3168 CHECK(check_sljit_emit_fop2r(compiler, op, dst_freg, src1, src1w, src2, src2w));
3177 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src2, src2w));
3178 pref = EX86_SELECT_66(op) | EX86_SSE2;
3180 …FAIL_IF(emit_groupf(compiler, ANDPD_x_xm | pref, TMP_FREG, SLJIT_MEM0(), (sljit_sw)((op & SLJIT_32…
3185 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, TMP_FREG, src1, src1w));
3191 FAIL_IF(emit_sse2_load(compiler, op & SLJIT_32, dst_freg, src2, src2w));
3193 pref = EX86_SELECT_66(op) | EX86_SSE2;
3195 …FAIL_IF(emit_groupf(compiler, ANDPD_x_xm | pref, dst_freg, SLJIT_MEM0(), (sljit_sw)((op & SLJIT_32…
3297 …JIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op, argument
3311 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type));
3320 if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst)) {
3335 reg = (GET_OPCODE(op) < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG1;
3354 if (GET_OPCODE(op) < SLJIT_ADD) {
3355 compiler->mode32 = GET_OPCODE(op) != SLJIT_MOV;
3360 return sljit_emit_op2(compiler, op, dst_save, dstw_save, dst_save, dstw_save, TMP_REG1, 0);
3366 if (GET_OPCODE(op) < SLJIT_ADD && FAST_IS_REG(dst) && reg_map[dst] <= 4) {
3382 if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst) && reg_map[dst] <= 4) {
3409 if (GET_OPCODE(op) < SLJIT_ADD)
3413 return sljit_emit_op2(compiler, op, dst_save, dstw_save, dst_save, dstw_save, TMP_REG1, 0);
3538 sljit_uw op; local
3551 op = EX86_SSE2;
3556 op = EX86_SSE2 | VEX_256;
3567 op |= alignment >= reg_size ? MOVAPS_x_xm : MOVUPS_x_xm;
3570 op |= EX86_PREF_66;
3573 op += 1;
3577 op |= ((type & SLJIT_SIMD_STORE) ? MOVDQA_xm_x : MOVDQA_x_xm)
3584 if (op & VEX_256)
3585 return emit_vex_instruction(compiler, op, freg, 0, srcdst, srcdstw);
3587 return emit_groupf(compiler, op, freg, srcdst, srcdstw);
4485 sljit_uw op = ((type & SLJIT_SIMD_FLOAT) ? MOVAPS_x_xm : MOVDQA_x_xm) | EX86_SSE2; local
4490 op |= EX86_PREF_66;
4492 return emit_groupf(compiler, op, dst_freg, src_freg, 0);
4501 sljit_uw op = 0; local
4521 op = (type & SLJIT_SIMD_FLOAT) ? ANDPD_x_xm : PAND_x_xm;
4524 op |= EX86_PREF_66;
4527 op = (type & SLJIT_SIMD_FLOAT) ? ORPD_x_xm : POR_x_xm;
4530 op |= EX86_PREF_66;
4533 op = (type & SLJIT_SIMD_FLOAT) ? XORPD_x_xm : PXOR_x_xm;
4536 op |= EX86_PREF_66;
4547 op |= VEX_256;
4549 …return emit_vex_instruction(compiler, op | EX86_SSE2 | VEX_SSE2_OPV, dst_freg, src1_freg, src2_fre…
4559 FAIL_IF(emit_groupf(compiler, op | EX86_SSE2, dst_freg, src2_freg, 0));
4563 …_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_atomic_load(struct sljit_compiler *compiler, sljit_s32 op, argument
4568 CHECK(check_sljit_emit_atomic_load(compiler, op, dst_reg, mem_reg));
4571 return sljit_emit_op1(compiler, op, dst_reg, 0, SLJIT_MEM1(mem_reg), 0);
4574 …API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_atomic_store(struct sljit_compiler *compiler, sljit_s32 op, argument
4587 CHECK(check_sljit_emit_atomic_store(compiler, op, src_reg, mem_reg, temp_reg));
4594 op = GET_OPCODE(op);
4596 if ((src_reg & SLJIT_MEM) || (op == SLJIT_MOV_U8 && reg_map[src_reg] >= 4)) {
4641 compiler->mode32 = op != SLJIT_MOV && op != SLJIT_MOV_P;
4648 if (op == SLJIT_MOV_U16)
4651 if (op == SLJIT_MOV_U8)
4655 …FAIL_IF(emit_groupf(compiler, (op == SLJIT_MOV_U8 ? CMPXCHG_rm8_r : CMPXCHG_rm_r) | pref, src_reg,…