Lines Matching refs:op

1063 #define IMM_EXTEND(v) (IMM_I((op & SLJIT_32) ? (v) : (32 + (v))))
1066 static sljit_s32 emit_clz_ctz(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_s… in emit_clz_ctz() argument
1068 sljit_s32 is_clz = (GET_OPCODE(op) == SLJIT_CLZ); in emit_clz_ctz()
1070 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in emit_clz_ctz()
1071 sljit_ins word_size = (op & SLJIT_32) ? 32 : 64; in emit_clz_ctz()
1110 static sljit_s32 emit_rev(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw sr… in emit_rev() argument
1112 SLJIT_UNUSED_ARG(op); in emit_rev()
1115 if (!(op & SLJIT_32)) { in emit_rev()
1153 static sljit_s32 emit_rev16(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw … in emit_rev16() argument
1156 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in emit_rev16()
1157 sljit_ins word_size = (op & SLJIT_32) ? 32 : 64; in emit_rev16()
1165 …FAIL_IF(push_inst(compiler, (GET_OPCODE(op) == SLJIT_REV_U16 ? SRLI : SRAI) | WORD | RD(dst) | RS1… in emit_rev16()
1171 if (op & SLJIT_SET_Z) \
1177 if (op & SLJIT_SET_Z) \
1187 static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s… in emit_single_op() argument
1193 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in emit_single_op()
1198 switch (GET_OPCODE(op)) { in emit_single_op()
1260 return emit_clz_ctz(compiler, op, dst, src2); in emit_single_op()
1268 return emit_rev(compiler, op, dst, src2); in emit_single_op()
1273 return emit_rev16(compiler, op, dst, src2); in emit_single_op()
1278 FAIL_IF(emit_rev(compiler, op, dst, src2)); in emit_single_op()
1287 is_overflow = GET_FLAG_TYPE(op) == SLJIT_OVERFLOW; in emit_single_op()
1288 carry_src_r = GET_FLAG_TYPE(op) == SLJIT_CARRY; in emit_single_op()
1297 else if (op & SLJIT_SET_Z) in emit_single_op()
1301 if (!(flags & UNUSED_DEST) || (op & VARIABLE_FLAG_MASK)) in emit_single_op()
1307 else if (op & SLJIT_SET_Z) in emit_single_op()
1322 if (!(flags & UNUSED_DEST) || (op & VARIABLE_FLAG_MASK)) in emit_single_op()
1338 if (op & SLJIT_SET_Z) in emit_single_op()
1344 carry_src_r = GET_FLAG_TYPE(op) == SLJIT_CARRY; in emit_single_op()
1391 if (GET_FLAG_TYPE(op) == SLJIT_LESS) { in emit_single_op()
1395 else if (GET_FLAG_TYPE(op) == SLJIT_SIG_LESS) { in emit_single_op()
1401 if (!is_handled && GET_FLAG_TYPE(op) >= SLJIT_LESS && GET_FLAG_TYPE(op) <= SLJIT_SIG_LESS_EQUAL) { in emit_single_op()
1410 switch (GET_FLAG_TYPE(op)) { in emit_single_op()
1428 if (op & SLJIT_SET_Z) in emit_single_op()
1434 if (op & SLJIT_SET_Z) in emit_single_op()
1442 is_overflow = GET_FLAG_TYPE(op) == SLJIT_OVERFLOW; in emit_single_op()
1443 is_carry = GET_FLAG_TYPE(op) == SLJIT_CARRY; in emit_single_op()
1452 else if (op & SLJIT_SET_Z) in emit_single_op()
1459 if (!(flags & UNUSED_DEST) || (op & VARIABLE_FLAG_MASK)) in emit_single_op()
1465 else if (op & SLJIT_SET_Z) in emit_single_op()
1472 if (!(flags & UNUSED_DEST) || (op & VARIABLE_FLAG_MASK)) in emit_single_op()
1480 if (op & SLJIT_SET_Z) in emit_single_op()
1492 is_carry = GET_FLAG_TYPE(op) == SLJIT_CARRY; in emit_single_op()
1520 if (GET_FLAG_TYPE(op) != SLJIT_OVERFLOW) in emit_single_op()
1572 op_imm = (GET_OPCODE(op) == SLJIT_ROTL) ? SLLI : SRLI; in emit_single_op()
1576 src2 = ((op & SLJIT_32) ? 32 : 64) - src2; in emit_single_op()
1580 op_imm = (GET_OPCODE(op) == SLJIT_ROTL) ? SRLI : SLLI; in emit_single_op()
1592 op_reg = (GET_OPCODE(op) == SLJIT_ROTL) ? SLL : SRL; in emit_single_op()
1594 op_reg = (GET_OPCODE(op) == SLJIT_ROTL) ? SRL : SLL; in emit_single_op()
1604 if (op & SLJIT_SET_Z) in emit_single_op()
1612 if (op & SLJIT_SET_Z) in emit_single_op()
1622 static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, in emit_op() argument
1642 SLJIT_ASSERT(HAS_FLAGS(op)); in emit_op()
1712 op = SLJIT_MOV; in emit_op()
1741 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
1754 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in sljit_emit_op0() argument
1757 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in sljit_emit_op0()
1763 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
1765 switch (GET_OPCODE(op)) { in sljit_emit_op0()
1798 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op1() argument
1805 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1810 if (op & SLJIT_32) in sljit_emit_op1()
1814 switch (GET_OPCODE(op)) { in sljit_emit_op1()
1835 …return emit_op(compiler, op, BYTE_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src == SLJIT_IMM) … in sljit_emit_op1()
1838 …return emit_op(compiler, op, BYTE_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src … in sljit_emit_op1()
1841 …return emit_op(compiler, op, HALF_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src == SLJIT_IMM) … in sljit_emit_op1()
1844 …return emit_op(compiler, op, HALF_DATA | SIGNED_DATA | MOVE_OP, dst, dstw, TMP_REG1, 0, src, (src … in sljit_emit_op1()
1849 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1853 return emit_op(compiler, op, HALF_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1857 return emit_op(compiler, op | SLJIT_32, INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1864 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2() argument
1872 CHECK(check_sljit_emit_op2(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1878 if (op & SLJIT_32) { in sljit_emit_op2()
1887 switch (GET_OPCODE(op)) { in sljit_emit_op2()
1891 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1896 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1900 return emit_op(compiler, op, flags | CUMULATIVE_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1905 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1919 if (op & SLJIT_32) in sljit_emit_op2()
1926 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1933 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2u() argument
1938 CHECK(check_sljit_emit_op2(compiler, op, 1, 0, 0, src1, src1w, src2, src2w)); in sljit_emit_op2u()
1941 return sljit_emit_op2(compiler, op, 0, 0, src1, src1w, src2, src2w); in sljit_emit_op2u()
1944 …T_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_shift_into(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_shift_into() argument
1953 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in sljit_emit_shift_into()
1954 sljit_s32 inp_flags = ((op & SLJIT_32) ? INT_DATA : WORD_DATA) | LOAD_DATA; in sljit_emit_shift_into()
1955 sljit_sw bit_length = (op & SLJIT_32) ? 32 : 64; in sljit_emit_shift_into()
1964 CHECK(check_sljit_emit_shift_into(compiler, op, dst_reg, src1_reg, src2_reg, src3, src3w)); in sljit_emit_shift_into()
1966 is_left = (GET_OPCODE(op) == SLJIT_SHL || GET_OPCODE(op) == SLJIT_MSHL); in sljit_emit_shift_into()
1970 …return sljit_emit_op2(compiler, (is_left ? SLJIT_ROTL : SLJIT_ROTR) | (op & SLJIT_32), dst_reg, 0,… in sljit_emit_shift_into()
2016 if (!(op & SLJIT_SHIFT_INTO_NON_ZERO)) { in sljit_emit_shift_into()
2027 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_src() argument
2031 CHECK(check_sljit_emit_op_src(compiler, op, src, srcw)); in sljit_emit_op_src()
2034 switch (op) { in sljit_emit_op_src()
2054 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_dst(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_dst() argument
2060 CHECK(check_sljit_emit_op_dst(compiler, op, dst, dstw)); in sljit_emit_op_dst()
2063 switch (op) { in sljit_emit_op_dst()
2110 #define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_32) >> 7)) argument
2111 #define FMT(op) ((sljit_ins)((op & SLJIT_32) ^ SLJIT_32) << 17) argument
2113 …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
2120 sljit_u32 flags = ((sljit_u32)(GET_OPCODE(op) == SLJIT_CONV_SW_FROM_F64)) << 21; in sljit_emit_fop1_conv_sw_from_f64()
2125 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()
2129 FAIL_IF(push_inst(compiler, FCVT_W_S | FMT(op) | flags | RD(dst_r) | FRS1(src))); in sljit_emit_fop1_conv_sw_from_f64()
2171 …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
2175 sljit_ins ins = FCVT_S_W | FMT(op); in sljit_emit_fop1_conv_f64_from_sw()
2178 if (op & SLJIT_32) in sljit_emit_fop1_conv_f64_from_sw()
2181 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_SW) in sljit_emit_fop1_conv_f64_from_sw()
2186 if (op != SLJIT_CONV_F64_FROM_S32) in sljit_emit_fop1_conv_f64_from_sw()
2193 …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
2197 sljit_ins ins = FCVT_S_WU | FMT(op); in sljit_emit_fop1_conv_f64_from_uw()
2200 if (op & SLJIT_32) in sljit_emit_fop1_conv_f64_from_uw()
2203 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_UW) in sljit_emit_fop1_conv_f64_from_uw()
2208 if (op != SLJIT_CONV_F64_FROM_S32) in sljit_emit_fop1_conv_f64_from_uw()
2215 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1_cmp() argument
2222 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w)); in sljit_emit_fop1_cmp()
2227 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, 0, 0)); in sljit_emit_fop1_cmp()
2231 switch (GET_FLAG_TYPE(op)) { in sljit_emit_fop1_cmp()
2234 inst = FEQ_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src2); in sljit_emit_fop1_cmp()
2238 inst = FLT_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src2); in sljit_emit_fop1_cmp()
2241 inst = FLT_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src2) | FRS2(src1); in sljit_emit_fop1_cmp()
2245 inst = FLE_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src2); in sljit_emit_fop1_cmp()
2248 inst = FLE_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src2) | FRS2(src1); in sljit_emit_fop1_cmp()
2251 FAIL_IF(push_inst(compiler, FLT_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src2))); in sljit_emit_fop1_cmp()
2252 FAIL_IF(push_inst(compiler, FLT_S | FMT(op) | RD(TMP_REG1) | FRS1(src2) | FRS2(src1))); in sljit_emit_fop1_cmp()
2257 inst = FEQ_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src1); in sljit_emit_fop1_cmp()
2260 FAIL_IF(push_inst(compiler, FEQ_S | FMT(op) | RD(OTHER_FLAG) | FRS1(src1) | FRS2(src1))); in sljit_emit_fop1_cmp()
2261 FAIL_IF(push_inst(compiler, FEQ_S | FMT(op) | RD(TMP_REG1) | FRS1(src2) | FRS2(src2))); in sljit_emit_fop1_cmp()
2269 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1() argument
2280 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
2282 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) in sljit_emit_fop1()
2283 op ^= SLJIT_32; in sljit_emit_fop1()
2288 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, dst, dstw)); in sljit_emit_fop1()
2292 switch (GET_OPCODE(op)) { in sljit_emit_fop1()
2296 FAIL_IF(push_inst(compiler, FSGNJ_S | FMT(op) | FRD(dst_r) | FRS1(src) | FRS2(src))); in sljit_emit_fop1()
2302 FAIL_IF(push_inst(compiler, FSGNJN_S | FMT(op) | FRD(dst_r) | FRS1(src) | FRS2(src))); in sljit_emit_fop1()
2305 FAIL_IF(push_inst(compiler, FSGNJX_S | FMT(op) | FRD(dst_r) | FRS1(src) | FRS2(src))); in sljit_emit_fop1()
2309 …FAIL_IF(push_inst(compiler, FCVT_S_D | ((op & SLJIT_32) ? (1 << 25) : ((1 << 20) | F3(7))) | FRD(d… in sljit_emit_fop1()
2310 op ^= SLJIT_32; in sljit_emit_fop1()
2315 return emit_op_mem2(compiler, FLOAT_DATA(op), dst_r, dst, dstw, 0, 0); in sljit_emit_fop1()
2319 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop2() argument
2327 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2338 if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w)) { in sljit_emit_fop2()
2346 if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w)) { in sljit_emit_fop2()
2355 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, src1, src1w)); in sljit_emit_fop2()
2356 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
2359 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2360 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
2364 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
2366 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
2373 switch (GET_OPCODE(op)) { in sljit_emit_fop2()
2375 FAIL_IF(push_inst(compiler, FADD_S | FMT(op) | FRD(dst_r) | FRS1(src1) | FRS2(src2))); in sljit_emit_fop2()
2379 FAIL_IF(push_inst(compiler, FSUB_S | FMT(op) | FRD(dst_r) | FRS1(src1) | FRS2(src2))); in sljit_emit_fop2()
2383 FAIL_IF(push_inst(compiler, FMUL_S | FMT(op) | FRD(dst_r) | FRS1(src1) | FRS2(src2))); in sljit_emit_fop2()
2387 FAIL_IF(push_inst(compiler, FDIV_S | FMT(op) | FRD(dst_r) | FRS1(src1) | FRS2(src2))); in sljit_emit_fop2()
2391 return push_inst(compiler, FSGNJ_S | FMT(op) | FRD(dst_r) | FRS1(src1) | FRS2(src2)); in sljit_emit_fop2()
2395 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0)); in sljit_emit_fop2()
2714 …JIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_flags() argument
2719 sljit_s32 saved_op = op; in sljit_emit_op_flags()
2723 sljit_s32 mem_type = ((op & SLJIT_32) || op == SLJIT_MOV32) ? (INT_DATA | SIGNED_DATA) : WORD_DATA; in sljit_emit_op_flags()
2727 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2730 op = GET_OPCODE(op); in sljit_emit_op_flags()
2731 dst_r = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2; in sljit_emit_op_flags()
2736 if (op >= SLJIT_ADD && (dst & SLJIT_MEM)) in sljit_emit_op_flags()
2785 if (op < SLJIT_ADD) { in sljit_emit_op_flags()