Lines Matching refs:op

96 #define GET_FLAG_TYPE(op) ((op) >> VARIABLE_FLAG_SHIFT)  argument
98 #define GET_OPCODE(op) \ argument
99 ((op) & ~(SLJIT_I32_OP | SLJIT_SET_Z | VARIABLE_FLAG_MASK))
101 #define HAS_FLAGS(op) \ argument
102 ((op) & (SLJIT_SET_Z | VARIABLE_FLAG_MASK))
104 #define GET_ALL_FLAGS(op) \ argument
105 ((op) & (SLJIT_I32_OP | SLJIT_SET_Z | VARIABLE_FLAG_MASK))
108 #define TYPE_CAST_NEEDED(op) \ argument
109 ((op) >= SLJIT_MOV_U8 && (op) <= SLJIT_MOV_S32)
111 #define TYPE_CAST_NEEDED(op) \ argument
112 ((op) >= SLJIT_MOV_U8 && (op) <= SLJIT_MOV_S16)
1120 …RN_TYPE check_sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, slji… in check_sljit_emit_return() argument
1124 if (op != SLJIT_UNUSED) { in check_sljit_emit_return()
1125 CHECK_ARGUMENT(op >= SLJIT_MOV && op <= SLJIT_MOV_P); in check_sljit_emit_return()
1134 if (op == SLJIT_UNUSED) in check_sljit_emit_return()
1137 fprintf(compiler->verbose, " return%s ", op1_names[op - SLJIT_OP1_BASE]); in check_sljit_emit_return()
1162 … SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in check_sljit_emit_op0() argument
1165 CHECK_ARGUMENT((op >= SLJIT_BREAKPOINT && op <= SLJIT_LMUL_SW) in check_sljit_emit_op0()
1166 || ((op & ~SLJIT_I32_OP) >= SLJIT_DIVMOD_UW && (op & ~SLJIT_I32_OP) <= SLJIT_DIV_SW) in check_sljit_emit_op0()
1167 || (op >= SLJIT_ENDBR && op <= SLJIT_SKIP_FRAMES_BEFORE_RETURN)); in check_sljit_emit_op0()
1168 …CHECK_ARGUMENT(GET_OPCODE(op) < SLJIT_LMUL_UW || GET_OPCODE(op) >= SLJIT_ENDBR || compiler->scratc… in check_sljit_emit_op0()
1169 …if ((GET_OPCODE(op) >= SLJIT_LMUL_UW && GET_OPCODE(op) <= SLJIT_DIV_SW) || op == SLJIT_SKIP_FRAMES… in check_sljit_emit_op0()
1175 fprintf(compiler->verbose, " %s", op0_names[GET_OPCODE(op) - SLJIT_OP0_BASE]); in check_sljit_emit_op0()
1176 if (GET_OPCODE(op) >= SLJIT_DIVMOD_UW && GET_OPCODE(op) <= SLJIT_DIV_SW) { in check_sljit_emit_op0()
1177 fprintf(compiler->verbose, (op & SLJIT_I32_OP) ? "32" : "w"); in check_sljit_emit_op0()
1185 … SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in check_sljit_emit_op1() argument
1195 CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_CLZ); in check_sljit_emit_op1()
1197 switch (GET_OPCODE(op)) { in check_sljit_emit_op1()
1200 CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK)); in check_sljit_emit_op1()
1203 CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK) in check_sljit_emit_op1()
1204 || GET_FLAG_TYPE(op) == SLJIT_OVERFLOW); in check_sljit_emit_op1()
1210 CHECK_ARGUMENT(!(op & (SLJIT_I32_OP | SLJIT_SET_Z | VARIABLE_FLAG_MASK))); in check_sljit_emit_op1()
1214 CHECK_ARGUMENT(!(op & (SLJIT_SET_Z | VARIABLE_FLAG_MASK))); in check_sljit_emit_op1()
1218 FUNCTION_CHECK_DST(dst, dstw, HAS_FLAGS(op)); in check_sljit_emit_op1()
1221 if (GET_OPCODE(op) >= SLJIT_NOT) { in check_sljit_emit_op1()
1223 compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_I32_OP | SLJIT_SET_Z)); in check_sljit_emit_op1()
1228 if (GET_OPCODE(op) <= SLJIT_MOV_P) in check_sljit_emit_op1()
1230 fprintf(compiler->verbose, " mov%s%s ", !(op & SLJIT_I32_OP) ? "" : "32", in check_sljit_emit_op1()
1231 (op != SLJIT_MOV32) ? op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE] : ""); in check_sljit_emit_op1()
1235 …fprintf(compiler->verbose, " %s%s%s%s%s ", op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE], !(op & SLJ… in check_sljit_emit_op1()
1236 !(op & SLJIT_SET_Z) ? "" : ".z", !(op & VARIABLE_FLAG_MASK) ? "" : ".", in check_sljit_emit_op1()
1237 !(op & VARIABLE_FLAG_MASK) ? "" : jump_names[GET_FLAG_TYPE(op)]); in check_sljit_emit_op1()
1249 … SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, in check_sljit_emit_op2() argument
1260 CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_ADD && GET_OPCODE(op) <= SLJIT_ASHR); in check_sljit_emit_op2()
1262 switch (GET_OPCODE(op)) { in check_sljit_emit_op2()
1269 CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK)); in check_sljit_emit_op2()
1272 CHECK_ARGUMENT(!(op & SLJIT_SET_Z)); in check_sljit_emit_op2()
1273 CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK) in check_sljit_emit_op2()
1274 || GET_FLAG_TYPE(op) == SLJIT_MUL_OVERFLOW); in check_sljit_emit_op2()
1277 CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK) in check_sljit_emit_op2()
1278 || GET_FLAG_TYPE(op) == GET_FLAG_TYPE(SLJIT_SET_CARRY) in check_sljit_emit_op2()
1279 || GET_FLAG_TYPE(op) == SLJIT_OVERFLOW); in check_sljit_emit_op2()
1282 CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK) in check_sljit_emit_op2()
1283 || (GET_FLAG_TYPE(op) >= SLJIT_LESS && GET_FLAG_TYPE(op) <= SLJIT_OVERFLOW) in check_sljit_emit_op2()
1284 || GET_FLAG_TYPE(op) == GET_FLAG_TYPE(SLJIT_SET_CARRY)); in check_sljit_emit_op2()
1288 CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK) in check_sljit_emit_op2()
1289 || GET_FLAG_TYPE(op) == GET_FLAG_TYPE(SLJIT_SET_CARRY)); in check_sljit_emit_op2()
1291 CHECK_ARGUMENT((op & SLJIT_I32_OP) == (compiler->last_flags & SLJIT_I32_OP)); in check_sljit_emit_op2()
1298 FUNCTION_CHECK_DST(dst, dstw, HAS_FLAGS(op)); in check_sljit_emit_op2()
1301 compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_I32_OP | SLJIT_SET_Z)); in check_sljit_emit_op2()
1305 …fprintf(compiler->verbose, " %s%s%s%s%s ", op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], !(op & SLJ… in check_sljit_emit_op2()
1306 !(op & SLJIT_SET_Z) ? "" : ".z", !(op & VARIABLE_FLAG_MASK) ? "" : ".", in check_sljit_emit_op2()
1307 !(op & VARIABLE_FLAG_MASK) ? "" : jump_names[GET_FLAG_TYPE(op)]); in check_sljit_emit_op2()
1319 …JIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, in check_sljit_emit_op_src() argument
1323 CHECK_ARGUMENT(op >= SLJIT_FAST_RETURN && op <= SLJIT_PREFETCH_ONCE); in check_sljit_emit_op_src()
1326 if (op == SLJIT_FAST_RETURN || op == SLJIT_SKIP_FRAMES_BEFORE_FAST_RETURN) in check_sljit_emit_op_src()
1331 else if (op >= SLJIT_PREFETCH_L1 && op <= SLJIT_PREFETCH_ONCE) in check_sljit_emit_op_src()
1338 fprintf(compiler->verbose, " %s ", op_src_names[op - SLJIT_OP_SRC_BASE]); in check_sljit_emit_op_src()
1398 …SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, in check_sljit_emit_fop1() argument
1409 CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_MOV_F64 && GET_OPCODE(op) <= SLJIT_ABS_F64); in check_sljit_emit_fop1()
1410 CHECK_ARGUMENT(!(op & (SLJIT_SET_Z | VARIABLE_FLAG_MASK))); in check_sljit_emit_fop1()
1416 if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) in check_sljit_emit_fop1()
1418 (op & SLJIT_F32_OP) ? ".f32.from.f64" : ".f64.from.f32"); in check_sljit_emit_fop1()
1420 fprintf(compiler->verbose, " %s%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1()
1421 (op & SLJIT_F32_OP) ? ".f32" : ".f64"); in check_sljit_emit_fop1()
1432 …T_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op, in check_sljit_emit_fop1_cmp() argument
1437 compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_I32_OP | SLJIT_SET_Z)); in check_sljit_emit_fop1_cmp()
1447 CHECK_ARGUMENT(GET_OPCODE(op) == SLJIT_CMP_F64); in check_sljit_emit_fop1_cmp()
1448 CHECK_ARGUMENT(!(op & SLJIT_SET_Z)); in check_sljit_emit_fop1_cmp()
1449 CHECK_ARGUMENT((op & VARIABLE_FLAG_MASK) in check_sljit_emit_fop1_cmp()
1450 || (GET_FLAG_TYPE(op) >= SLJIT_EQUAL_F64 && GET_FLAG_TYPE(op) <= SLJIT_ORDERED_F64)); in check_sljit_emit_fop1_cmp()
1456 …fprintf(compiler->verbose, " %s%s", fop1_names[SLJIT_CMP_F64 - SLJIT_FOP1_BASE], (op & SLJIT_F32_… in check_sljit_emit_fop1_cmp()
1457 if (op & VARIABLE_FLAG_MASK) { in check_sljit_emit_fop1_cmp()
1458 fprintf(compiler->verbose, ".%s_f", jump_names[GET_FLAG_TYPE(op)]); in check_sljit_emit_fop1_cmp()
1470 …K_RETURN_TYPE check_sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op, in check_sljit_emit_fop1_conv_sw_from_f64() argument
1481 …CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_CONV_SW_FROM_F64 && GET_OPCODE(op) <= SLJIT_CONV_S32_FROM_F… in check_sljit_emit_fop1_conv_sw_from_f64()
1482 CHECK_ARGUMENT(!(op & (SLJIT_SET_Z | VARIABLE_FLAG_MASK))); in check_sljit_emit_fop1_conv_sw_from_f64()
1488 fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1_conv_sw_from_f64()
1489 (GET_OPCODE(op) == SLJIT_CONV_S32_FROM_F64) ? ".s32" : ".sw", in check_sljit_emit_fop1_conv_sw_from_f64()
1490 (op & SLJIT_F32_OP) ? ".f32" : ".f64"); in check_sljit_emit_fop1_conv_sw_from_f64()
1500 …K_RETURN_TYPE check_sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op, in check_sljit_emit_fop1_conv_f64_from_sw() argument
1511 …CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_CONV_F64_FROM_SW && GET_OPCODE(op) <= SLJIT_CONV_F64_FROM_S… in check_sljit_emit_fop1_conv_f64_from_sw()
1512 CHECK_ARGUMENT(!(op & (SLJIT_SET_Z | VARIABLE_FLAG_MASK))); in check_sljit_emit_fop1_conv_f64_from_sw()
1518 fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1_conv_f64_from_sw()
1519 (op & SLJIT_F32_OP) ? ".f32" : ".f64", in check_sljit_emit_fop1_conv_f64_from_sw()
1520 (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32) ? ".s32" : ".sw"); in check_sljit_emit_fop1_conv_f64_from_sw()
1530 …SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, in check_sljit_emit_fop2() argument
1537 CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_ADD_F64 && GET_OPCODE(op) <= SLJIT_DIV_F64); in check_sljit_emit_fop2()
1538 CHECK_ARGUMENT(!(op & (SLJIT_SET_Z | VARIABLE_FLAG_MASK))); in check_sljit_emit_fop2()
1545 …fprintf(compiler->verbose, " %s%s ", fop2_names[GET_OPCODE(op) - SLJIT_FOP2_BASE], (op & SLJIT_F3… in check_sljit_emit_fop2()
1796 …T_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op, in check_sljit_emit_op_flags() argument
1804 CHECK_ARGUMENT(op == SLJIT_MOV || op == SLJIT_MOV32 in check_sljit_emit_op_flags()
1805 || (GET_OPCODE(op) >= SLJIT_AND && GET_OPCODE(op) <= SLJIT_XOR)); in check_sljit_emit_op_flags()
1806 CHECK_ARGUMENT(!(op & VARIABLE_FLAG_MASK)); in check_sljit_emit_op_flags()
1817 if (GET_OPCODE(op) >= SLJIT_ADD) in check_sljit_emit_op_flags()
1818 compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_I32_OP | SLJIT_SET_Z)); in check_sljit_emit_op_flags()
1823 !(op & SLJIT_SET_Z) ? "" : ".z", in check_sljit_emit_op_flags()
1824 GET_OPCODE(op) < SLJIT_OP2_BASE ? "mov" : op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], in check_sljit_emit_op_flags()
1825 …GET_OPCODE(op) < SLJIT_OP2_BASE ? op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE] : ((op & SLJIT_I32_OP… in check_sljit_emit_op_flags()
1987 #define SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw) \ argument
1990 if (GET_OPCODE(op) >= SLJIT_CONV_SW_FROM_F64 && GET_OPCODE(op) <= SLJIT_CMP_F64) { \
1991 if (GET_OPCODE(op) == SLJIT_CMP_F64) { \
1992 CHECK(check_sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw)); \
1995 return sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw); \
1997 if ((GET_OPCODE(op) | 0x1) == SLJIT_CONV_S32_FROM_F64) { \
1998 CHECK(check_sljit_emit_fop1_conv_sw_from_f64(compiler, op, dst, dstw, src, srcw)); \
2001 return sljit_emit_fop1_conv_sw_from_f64(compiler, op, dst, dstw, src, srcw); \
2003 CHECK(check_sljit_emit_fop1_conv_f64_from_sw(compiler, op, dst, dstw, src, srcw)); \
2006 return sljit_emit_fop1_conv_f64_from_sw(compiler, op, dst, dstw, src, srcw); \
2008 CHECK(check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw)); \
2012 static SLJIT_INLINE sljit_s32 emit_mov_before_return(struct sljit_compiler *compiler, sljit_s32 op,… in emit_mov_before_return() argument
2015 if (op == SLJIT_UNUSED) in emit_mov_before_return()
2020 if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_P)) in emit_mov_before_return()
2023 …if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_U32 || op == SLJIT_MOV_S32 || o… in emit_mov_before_return()
2031 return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw); in emit_mov_before_return()
2045 sljit_s32 op = (dst_reg & SLJIT_I32_OP) ? SLJIT_MOV32 : SLJIT_MOV; in sljit_emit_cmov_generic() local
2058 FAIL_IF(sljit_emit_op1(compiler, op, dst_reg & ~SLJIT_I32_OP, 0, src, srcw)); in sljit_emit_cmov_generic()
2383 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op,… in sljit_emit_return() argument
2386 SLJIT_UNUSED_ARG(op); in sljit_emit_return()
2402 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in sljit_emit_op0() argument
2405 SLJIT_UNUSED_ARG(op); in sljit_emit_op0()
2410 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op1() argument
2415 SLJIT_UNUSED_ARG(op); in sljit_emit_op1()
2424 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2() argument
2430 SLJIT_UNUSED_ARG(op); in sljit_emit_op2()
2441 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_src() argument
2445 SLJIT_UNUSED_ARG(op); in sljit_emit_op_src()
2474 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1() argument
2479 SLJIT_UNUSED_ARG(op); in sljit_emit_fop1()
2488 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop2() argument
2494 SLJIT_UNUSED_ARG(op); in sljit_emit_fop2()
2602 …JIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_flags() argument
2607 SLJIT_UNUSED_ARG(op); in sljit_emit_op_flags()