Lines Matching refs:op
1162 #define IMM_EXTEND(v) (IMM_I((op & SLJIT_32) ? (v) : (32 + (v))))
1165 static sljit_s32 emit_clz_ctz(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_s… in emit_clz_ctz() argument
1167 sljit_s32 is_clz = (GET_OPCODE(op) == SLJIT_CLZ); in emit_clz_ctz()
1169 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in emit_clz_ctz()
1170 sljit_ins word_size = (op & SLJIT_32) ? 32 : 64; in emit_clz_ctz()
1209 static sljit_s32 emit_rev(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw sr… in emit_rev() argument
1211 SLJIT_UNUSED_ARG(op); in emit_rev()
1214 if (!(op & SLJIT_32)) { in emit_rev()
1252 static sljit_s32 emit_rev16(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw … in emit_rev16() argument
1255 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in emit_rev16()
1256 sljit_ins word_size = (op & SLJIT_32) ? 32 : 64; in emit_rev16()
1264 …FAIL_IF(push_inst(compiler, (GET_OPCODE(op) == SLJIT_REV_U16 ? SRLI : SRAI) | WORD | RD(dst) | RS1… in emit_rev16()
1270 if (op & SLJIT_SET_Z) \
1276 if (op & SLJIT_SET_Z) \
1286 static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s… in emit_single_op() argument
1292 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in emit_single_op()
1297 switch (GET_OPCODE(op)) { in emit_single_op()
1359 return emit_clz_ctz(compiler, op, dst, src2); in emit_single_op()
1367 return emit_rev(compiler, op, dst, src2); in emit_single_op()
1372 return emit_rev16(compiler, op, dst, src2); in emit_single_op()
1377 FAIL_IF(emit_rev(compiler, op, dst, src2)); in emit_single_op()
1386 is_overflow = GET_FLAG_TYPE(op) == SLJIT_OVERFLOW; in emit_single_op()
1387 carry_src_r = GET_FLAG_TYPE(op) == SLJIT_CARRY; in emit_single_op()
1396 else if (op & SLJIT_SET_Z) in emit_single_op()
1400 if (!(flags & UNUSED_DEST) || (op & VARIABLE_FLAG_MASK)) in emit_single_op()
1406 else if (op & SLJIT_SET_Z) in emit_single_op()
1421 if (!(flags & UNUSED_DEST) || (op & VARIABLE_FLAG_MASK)) in emit_single_op()
1437 if (op & SLJIT_SET_Z) in emit_single_op()
1443 carry_src_r = GET_FLAG_TYPE(op) == SLJIT_CARRY; in emit_single_op()
1490 if (GET_FLAG_TYPE(op) == SLJIT_LESS) { in emit_single_op()
1494 else if (GET_FLAG_TYPE(op) == SLJIT_SIG_LESS) { in emit_single_op()
1500 if (!is_handled && GET_FLAG_TYPE(op) >= SLJIT_LESS && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL) { in emit_single_op()
1510 switch (GET_FLAG_TYPE(op)) { in emit_single_op()
1528 if (op & SLJIT_SET_Z) in emit_single_op()
1534 if (op & SLJIT_SET_Z) in emit_single_op()
1542 is_overflow = GET_FLAG_TYPE(op) == SLJIT_OVERFLOW; in emit_single_op()
1543 is_carry = GET_FLAG_TYPE(op) == SLJIT_CARRY; in emit_single_op()
1552 else if (op & SLJIT_SET_Z) in emit_single_op()
1559 if (!(flags & UNUSED_DEST) || (op & VARIABLE_FLAG_MASK)) in emit_single_op()
1565 else if (op & SLJIT_SET_Z) in emit_single_op()
1572 if (!(flags & UNUSED_DEST) || (op & VARIABLE_FLAG_MASK)) in emit_single_op()
1580 if (op & SLJIT_SET_Z) in emit_single_op()
1592 is_carry = GET_FLAG_TYPE(op) == SLJIT_CARRY; in emit_single_op()
1620 if (GET_FLAG_TYPE(op) != SLJIT_OVERFLOW) in emit_single_op()
1672 op_imm = (GET_OPCODE(op) == SLJIT_ROTL) ? SLLI : SRLI; in emit_single_op()
1676 src2 = ((op & SLJIT_32) ? 32 : 64) - src2; in emit_single_op()
1680 op_imm = (GET_OPCODE(op) == SLJIT_ROTL) ? SRLI : SLLI; in emit_single_op()
1692 op_reg = (GET_OPCODE(op) == SLJIT_ROTL) ? SLL : SRL; in emit_single_op()
1694 op_reg = (GET_OPCODE(op) == SLJIT_ROTL) ? SRL : SLL; in emit_single_op()
1704 if (op & SLJIT_SET_Z) in emit_single_op()
1712 if (op & SLJIT_SET_Z) in emit_single_op()
1722 static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, in emit_op() argument
1734 …sljit_s32 src2_tmp_reg = (GET_OPCODE(op) >= SLJIT_OP2_BASE && FAST_IS_REG(src1)) ? TMP_REG1 : TMP_… in emit_op()
1742 SLJIT_ASSERT(HAS_FLAGS(op)); in emit_op()
1808 op = SLJIT_MOV; in emit_op()
1835 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
1848 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in sljit_emit_op0() argument
1851 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in sljit_emit_op0()
1857 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
1859 switch (GET_OPCODE(op)) { in sljit_emit_op0()
1892 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op1() argument
1899 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1904 if (op & SLJIT_32) in sljit_emit_op1()
1908 switch (GET_OPCODE(op)) { in sljit_emit_op1()
1929 …return emit_op(compiler, op, BYTE_DATA | MOVE_OP, dst, dstw, TMP_ZERO, 0, src, (src == SLJIT_IMM) … in sljit_emit_op1()
1932 …return emit_op(compiler, op, BYTE_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_ZERO, 0, src, (src … in sljit_emit_op1()
1935 …return emit_op(compiler, op, HALF_DATA | MOVE_OP, dst, dstw, TMP_ZERO, 0, src, (src == SLJIT_IMM) … in sljit_emit_op1()
1938 …return emit_op(compiler, op, HALF_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_ZERO, 0, src, (src … in sljit_emit_op1()
1943 return emit_op(compiler, op, flags, dst, dstw, TMP_ZERO, 0, src, srcw); in sljit_emit_op1()
1947 return emit_op(compiler, op, HALF_DATA, dst, dstw, TMP_ZERO, 0, src, srcw); in sljit_emit_op1()
1951 return emit_op(compiler, op | SLJIT_32, INT_DATA, dst, dstw, TMP_ZERO, 0, src, srcw); in sljit_emit_op1()
1958 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2() argument
1966 CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1972 if (op & SLJIT_32) { in sljit_emit_op2()
1981 switch (GET_OPCODE(op)) { in sljit_emit_op2()
1985 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1990 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1994 return emit_op(compiler, op, flags | CUMULATIVE_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1999 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
2013 if (op & SLJIT_32) in sljit_emit_op2()
2020 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
2027 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2u() argument
2032 CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); in sljit_emit_op2u()
2035 return sljit_emit_op2(compiler, op, 0, 0, src1, src1w, src2, src2w); in sljit_emit_op2u()
2038 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2r(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2r() argument
2044 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in sljit_emit_op2r()
2048 CHECK(check_sljit_emit_op2r(compiler, op, dst_reg, src1, src1w, src2, src2w)); in sljit_emit_op2r()
2052 switch (GET_OPCODE(op)) { in sljit_emit_op2r()
2055 …FAIL_IF(sljit_emit_op2(compiler, SLJIT_MUL | (op & SLJIT_32), TMP_REG2, 0, src1, src1w, src2, src2… in sljit_emit_op2r()
2062 …T_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_shift_into(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_shift_into() argument
2071 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in sljit_emit_shift_into()
2072 sljit_s32 inp_flags = ((op & SLJIT_32) ? INT_DATA : WORD_DATA) | LOAD_DATA; in sljit_emit_shift_into()
2073 sljit_sw bit_length = (op & SLJIT_32) ? 32 : 64; in sljit_emit_shift_into()
2082 CHECK(check_sljit_emit_shift_into(compiler, op, dst_reg, src1_reg, src2_reg, src3, src3w)); in sljit_emit_shift_into()
2084 is_left = (GET_OPCODE(op) == SLJIT_SHL || GET_OPCODE(op) == SLJIT_MSHL); in sljit_emit_shift_into()
2088 …return sljit_emit_op2(compiler, (is_left ? SLJIT_ROTL : SLJIT_ROTR) | (op & SLJIT_32), dst_reg, 0,… in sljit_emit_shift_into()
2134 if (!(op & SLJIT_SHIFT_INTO_NON_ZERO)) { in sljit_emit_shift_into()
2145 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_src() argument
2149 CHECK(check_sljit_emit_op_src(compiler, op, src, srcw)); in sljit_emit_op_src()
2152 switch (op) { in sljit_emit_op_src()
2172 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_dst(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_dst() argument
2178 CHECK(check_sljit_emit_op_dst(compiler, op, dst, dstw)); in sljit_emit_op_dst()
2181 switch (op) { in sljit_emit_op_dst()
2228 #define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_32) >> 7)) argument
2229 #define FMT(op) ((sljit_ins)((op & SLJIT_32) ^ SLJIT_32) << 17) argument
2231 …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
2238 sljit_u32 flags = ((sljit_u32)(GET_OPCODE(op) == SLJIT_CONV_SW_FROM_F64)) << 21; in sljit_emit_fop1_conv_sw_from_f64()
2243 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw)); in sljit_emit_fop1_conv_sw_from_f64()
2247 FAIL_IF(push_inst(compiler, FCVT_W_S | FMT(op) | flags | RD(dst_r) | FRS1(src))); in sljit_emit_fop1_conv_sw_from_f64()
2289 …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
2293 sljit_ins ins = FCVT_S_W | FMT(op); in sljit_emit_fop1_conv_f64_from_sw()
2296 if (op & SLJIT_32) in sljit_emit_fop1_conv_f64_from_sw()
2299 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_SW) in sljit_emit_fop1_conv_f64_from_sw()
2304 if (op != SLJIT_CONV_F64_FROM_S32) in sljit_emit_fop1_conv_f64_from_sw()
2311 …IT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_uw(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1_conv_f64_from_uw() argument
2315 sljit_ins ins = FCVT_S_WU | FMT(op); in sljit_emit_fop1_conv_f64_from_uw()
2318 if (op & SLJIT_32) in sljit_emit_fop1_conv_f64_from_uw()
2321 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_UW) in sljit_emit_fop1_conv_f64_from_uw()
2326 if (op != SLJIT_CONV_F64_FROM_S32) in sljit_emit_fop1_conv_f64_from_uw()
2333 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1_cmp() argument
2340 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w)); in sljit_emit_fop1_cmp()
2345 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, 0, 0)); in sljit_emit_fop1_cmp()
2349 switch (GET_FLAG_TYPE(op)) { in sljit_emit_fop1_cmp()
2352 inst = FEQ_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src2); in sljit_emit_fop1_cmp()
2356 inst = FLT_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src2); in sljit_emit_fop1_cmp()
2359 inst = FLT_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src2) | FRS2(src1); in sljit_emit_fop1_cmp()
2363 inst = FLE_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src2); in sljit_emit_fop1_cmp()
2366 inst = FLE_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src2) | FRS2(src1); in sljit_emit_fop1_cmp()
2369 FAIL_IF(push_inst(compiler, FLT_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src2))); in sljit_emit_fop1_cmp()
2370 FAIL_IF(push_inst(compiler, FLT_S | FMT(op) | RD(TMP_REG1) | FRS1(src2) | FRS2(src1))); in sljit_emit_fop1_cmp()
2375 inst = FEQ_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src1); in sljit_emit_fop1_cmp()
2378 FAIL_IF(push_inst(compiler, FEQ_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src1))); in sljit_emit_fop1_cmp()
2379 FAIL_IF(push_inst(compiler, FEQ_S | FMT(op) | RD(TMP_REG1) | FRS1(src2) | FRS2(src2))); in sljit_emit_fop1_cmp()
2387 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1() argument
2398 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
2400 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) in sljit_emit_fop1()
2401 op ^= SLJIT_32; in sljit_emit_fop1()
2406 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, dst, dstw)); in sljit_emit_fop1()
2410 switch (GET_OPCODE(op)) { in sljit_emit_fop1()
2414 FAIL_IF(push_inst(compiler, FSGNJ_S | FMT(op) | FRD(dst_r) | FRS1(src) | FRS2(src))); in sljit_emit_fop1()
2420 FAIL_IF(push_inst(compiler, FSGNJN_S | FMT(op) | FRD(dst_r) | FRS1(src) | FRS2(src))); in sljit_emit_fop1()
2423 FAIL_IF(push_inst(compiler, FSGNJX_S | FMT(op) | FRD(dst_r) | FRS1(src) | FRS2(src))); in sljit_emit_fop1()
2427 …FAIL_IF(push_inst(compiler, FCVT_S_D | ((op & SLJIT_32) ? (1 << 25) : ((1 << 20) | F3(7))) | FRD(d… in sljit_emit_fop1()
2428 op ^= SLJIT_32; in sljit_emit_fop1()
2433 return emit_op_mem2(compiler, FLOAT_DATA(op), dst_r, dst, dstw, 0, 0); in sljit_emit_fop1()
2437 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop2() argument
2445 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2456 if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w)) { in sljit_emit_fop2()
2464 if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w)) { in sljit_emit_fop2()
2473 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, src1, src1w)); in sljit_emit_fop2()
2474 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
2476 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2477 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
2481 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
2483 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
2490 switch (GET_OPCODE(op)) { in sljit_emit_fop2()
2492 FAIL_IF(push_inst(compiler, FADD_S | FMT(op) | FRD(dst_r) | FRS1(src1) | FRS2(src2))); in sljit_emit_fop2()
2496 FAIL_IF(push_inst(compiler, FSUB_S | FMT(op) | FRD(dst_r) | FRS1(src1) | FRS2(src2))); in sljit_emit_fop2()
2500 FAIL_IF(push_inst(compiler, FMUL_S | FMT(op) | FRD(dst_r) | FRS1(src1) | FRS2(src2))); in sljit_emit_fop2()
2504 FAIL_IF(push_inst(compiler, FDIV_S | FMT(op) | FRD(dst_r) | FRS1(src1) | FRS2(src2))); in sljit_emit_fop2()
2508 return push_inst(compiler, FSGNJ_S | FMT(op) | FRD(dst_r) | FRS1(src1) | FRS2(src2)); in sljit_emit_fop2()
2512 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0)); in sljit_emit_fop2()
2820 …JIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_flags() argument
2825 sljit_s32 saved_op = op; in sljit_emit_op_flags()
2829 sljit_s32 mem_type = ((op & SLJIT_32) || op == SLJIT_MOV32) ? (INT_DATA | SIGNED_DATA) : WORD_DATA; in sljit_emit_op_flags()
2833 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2836 op = GET_OPCODE(op); in sljit_emit_op_flags()
2837 dst_r = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2; in sljit_emit_op_flags()
2842 if (op >= SLJIT_ADD && (dst & SLJIT_MEM)) in sljit_emit_op_flags()
2891 if (op < SLJIT_ADD) { in sljit_emit_op_flags()