Lines Matching refs:compiler
2 * Stack-less Just-In-Time compiler
31 if (SLJIT_UNLIKELY(compiler->error)) \
32 return compiler->error; \
37 if (SLJIT_UNLIKELY(compiler->error)) \
44 return compiler->error; \
56 compiler->error = SLJIT_ERR_ALLOC_FAILED; \
64 compiler->error = SLJIT_ERR_ALLOC_FAILED; \
72 compiler->error = SLJIT_ERR_EX_ALLOC_FAILED; \
266 compiler->error = SLJIT_ERR_BAD_ARGUMENT; \
274 compiler->error = SLJIT_ERR_BAD_ARGUMENT; \
330 struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(sizeof(struct sljit_compiler), allocator_data);
331 if (!compiler)
333 SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler));
350 compiler->error = SLJIT_SUCCESS;
352 compiler->allocator_data = allocator_data;
353 compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE, allocator_data);
354 compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE, allocator_data);
356 if (!compiler->buf || !compiler->abuf) {
357 if (compiler->buf)
358 SLJIT_FREE(compiler->buf, allocator_data);
359 if (compiler->abuf)
360 SLJIT_FREE(compiler->abuf, allocator_data);
361 SLJIT_FREE(compiler, allocator_data);
365 compiler->buf->next = NULL;
366 compiler->buf->used_size = 0;
367 compiler->abuf->next = NULL;
368 compiler->abuf->used_size = 0;
370 compiler->scratches = -1;
371 compiler->saveds = -1;
372 compiler->fscratches = -1;
373 compiler->fsaveds = -1;
374 compiler->local_size = -1;
377 compiler->args = -1;
381 compiler->cpool = (sljit_uw*)SLJIT_MALLOC(CPOOL_SIZE * sizeof(sljit_uw)
383 if (!compiler->cpool) {
384 SLJIT_FREE(compiler->buf, allocator_data);
385 SLJIT_FREE(compiler->abuf, allocator_data);
386 SLJIT_FREE(compiler, allocator_data);
389 compiler->cpool_unique = (sljit_u8*)(compiler->cpool + CPOOL_SIZE);
390 compiler->cpool_diff = 0xffffffff;
394 compiler->delay_slot = UNMOVABLE_INS;
398 compiler->delay_slot = UNMOVABLE_INS;
408 return compiler;
411 SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler)
415 void *allocator_data = compiler->allocator_data;
418 buf = compiler->buf;
425 buf = compiler->abuf;
433 SLJIT_FREE(compiler->cpool, allocator_data);
435 SLJIT_FREE(compiler, allocator_data);
438 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_compiler_memory_error(struct sljit_compiler *compiler)
440 if (compiler->error == SLJIT_SUCCESS)
441 compiler->error = SLJIT_ERR_ALLOC_FAILED;
486 static void* ensure_buf(struct sljit_compiler *compiler, sljit_uw size)
492 if (compiler->buf->used_size + size <= (BUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
493 ret = compiler->buf->memory + compiler->buf->used_size;
494 compiler->buf->used_size += size;
497 new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE, compiler->allocator_data);
499 new_frag->next = compiler->buf;
500 compiler->buf = new_frag;
505 static void* ensure_abuf(struct sljit_compiler *compiler, sljit_uw size)
511 if (compiler->abuf->used_size + size <= (ABUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
512 ret = compiler->abuf->memory + compiler->abuf->used_size;
513 compiler->abuf->used_size += size;
516 new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE, compiler->allocator_data);
518 new_frag->next = compiler->abuf;
519 compiler->abuf = new_frag;
524 SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_s32 size)
537 return ensure_abuf(compiler, size);
540 static SLJIT_INLINE void reverse_buf(struct sljit_compiler *compiler)
542 struct sljit_memory_fragment *buf = compiler->buf;
553 compiler->buf = prev;
556 static SLJIT_INLINE void set_emit_enter(struct sljit_compiler *compiler,
563 compiler->options = options;
564 compiler->scratches = scratches;
565 compiler->saveds = saveds;
566 compiler->fscratches = fscratches;
567 compiler->fsaveds = fsaveds;
569 compiler->logical_local_size = local_size;
573 static SLJIT_INLINE void set_set_context(struct sljit_compiler *compiler,
580 compiler->options = options;
581 compiler->scratches = scratches;
582 compiler->saveds = saveds;
583 compiler->fscratches = fscratches;
584 compiler->fsaveds = fsaveds;
586 compiler->logical_local_size = local_size;
590 static SLJIT_INLINE void set_label(struct sljit_label *label, struct sljit_compiler *compiler)
593 label->size = compiler->size;
594 if (compiler->last_label)
595 compiler->last_label->next = label;
597 compiler->labels = label;
598 compiler->last_label = label;
601 static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, sljit_s32 flags)
605 if (compiler->last_jump)
606 compiler->last_jump->next = jump;
608 compiler->jumps = jump;
609 compiler->last_jump = jump;
612 static SLJIT_INLINE void set_const(struct sljit_const *const_, struct sljit_compiler *compiler)
615 const_->addr = compiler->size;
616 if (compiler->last_const)
617 compiler->last_const->next = const_;
619 compiler->consts = const_;
620 compiler->last_const = const_;
688 (((r) >= SLJIT_R0 && (r) < (SLJIT_R0 + compiler->scratches)) || \
689 ((r) > (SLJIT_S0 - compiler->saveds) && (r) <= SLJIT_S0))
693 ((r) >= SLJIT_R0 && (r) < (SLJIT_R0 + compiler->scratches)) || \
694 ((r) > (SLJIT_S0 - compiler->saveds) && (r) <= SLJIT_S0))
704 CHECK_ARGUMENT(compiler->scratches != -1 && compiler->saveds != -1); \
710 CHECK_ARGUMENT((i) >= 0 && (i) < compiler->logical_local_size); \
725 CHECK_ARGUMENT(compiler->scratches != -1 && compiler->saveds != -1); \
729 CHECK_ARGUMENT((i) >= 0 && (i) < compiler->logical_local_size); \
744 CHECK_ARGUMENT(compiler->fscratches != -1 && compiler->fsaveds != -1); \
745 if (((p) >= SLJIT_FR0 && (p) < (SLJIT_FR0 + compiler->fscratches)) || \
746 ((p) > (SLJIT_FS0 - compiler->fsaveds) && (p) <= SLJIT_FS0)) \
749 CHECK_ARGUMENT((i) >= 0 && (i) < compiler->logical_local_size); \
775 SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose)
777 compiler->verbose = verbose;
790 #define sljit_verbose_reg(compiler, r) \
792 if ((r) < (SLJIT_R0 + compiler->scratches)) \
793 fprintf(compiler->verbose, "r%d", (r) - SLJIT_R0); \
795 fprintf(compiler->verbose, "s%d", SLJIT_NUMBER_OF_REGISTERS - (r)); \
798 #define sljit_verbose_param(compiler, p, i) \
800 fprintf(compiler->verbose, "#%" SLJIT_PRINT_D "d", (i)); \
803 fputc('[', compiler->verbose); \
804 sljit_verbose_reg(compiler, (p) & REG_MASK); \
806 fprintf(compiler->verbose, " + "); \
807 sljit_verbose_reg(compiler, OFFS_REG(p)); \
809 fprintf(compiler->verbose, " * %d", 1 << (i)); \
812 fprintf(compiler->verbose, " + %" SLJIT_PRINT_D "d", (i)); \
813 fputc(']', compiler->verbose); \
816 fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); \
818 sljit_verbose_reg(compiler, p); \
820 fprintf(compiler->verbose, "unused");
822 #define sljit_verbose_fparam(compiler, p, i) \
825 fputc('[', compiler->verbose); \
826 sljit_verbose_reg(compiler, (p) & REG_MASK); \
828 fprintf(compiler->verbose, " + "); \
829 sljit_verbose_reg(compiler, OFFS_REG(p)); \
831 fprintf(compiler->verbose, "%d", 1 << (i)); \
834 fprintf(compiler->verbose, "%" SLJIT_PRINT_D "d", (i)); \
835 fputc(']', compiler->verbose); \
838 fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); \
841 if ((p) < (SLJIT_FR0 + compiler->fscratches)) \
842 fprintf(compiler->verbose, "fr%d", (p) - SLJIT_FR0); \
844 fprintf(compiler->verbose, "fs%d", SLJIT_NUMBER_OF_FLOAT_REGISTERS - (p)); \
905 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_generate_code(struct sljit_compiler *compiler)
911 SLJIT_UNUSED_ARG(compiler);
914 CHECK_ARGUMENT(compiler->size > 0);
915 jump = compiler->jumps;
925 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_enter(struct sljit_compiler *compiler,
929 SLJIT_UNUSED_ARG(compiler);
944 if (SLJIT_UNLIKELY(!!compiler->verbose))
945 fprintf(compiler->verbose, " enter options:none args:%d scratches:%d saveds:%d fscratches:%d fsaveds:%d local_size:%d\n",
951 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_set_context(struct sljit_compiler *compiler,
955 if (SLJIT_UNLIKELY(compiler->skip_checks)) {
956 compiler->skip_checks = 0;
973 if (SLJIT_UNLIKELY(!!compiler->verbose))
974 fprintf(compiler->verbose, " set_context options:none args:%d scratches:%d saveds:%d fscratches:%d fsaveds:%d local_size:%d\n",
980 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
983 CHECK_ARGUMENT(compiler->scratches >= 0);
992 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
994 fprintf(compiler->verbose, " return\n");
996 fprintf(compiler->verbose, " return%s ", op1_names[op - SLJIT_OP1_BASE]);
997 sljit_verbose_param(compiler, src, srcw);
998 fprintf(compiler->verbose, "\n");
1005 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
1011 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1012 fprintf(compiler->verbose, " fast_enter ");
1013 sljit_verbose_param(compiler, dst, dstw);
1014 fprintf(compiler->verbose, "\n");
1020 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
1026 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1027 fprintf(compiler->verbose, " fast_return ");
1028 sljit_verbose_param(compiler, src, srcw);
1029 fprintf(compiler->verbose, "\n");
1035 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
1040 CHECK_ARGUMENT(op < SLJIT_LMUL_UW || compiler->scratches >= 2);
1043 if (SLJIT_UNLIKELY(!!compiler
1045 fprintf(compiler->verbose, " %s", op0_names[GET_OPCODE(op) - SLJIT_OP0_BASE]);
1047 fprintf(compiler->verbose, (op & SLJIT_I32_OP) ? "32" : "w");
1049 fprintf(compiler->verbose, "\n");
1055 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
1059 if (SLJIT_UNLIKELY(compiler->skip_checks)) {
1060 compiler->skip_checks = 0;
1072 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1075 fprintf(compiler->verbose, " mov%s%s%s ", (GET_OPCODE(op) >= SLJIT_MOVU) ? "u" : "",
1080 fprintf(compiler->verbose, " %s%s%s%s%s%s%s%s ", op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE], !(op & SLJIT_I32_OP) ? "" : "32",
1085 sljit_verbose_param(compiler, dst, dstw);
1086 fprintf(compiler->verbose, ", ");
1087 sljit_verbose_param(compiler, src, srcw);
1088 fprintf(compiler->verbose, "\n");
1094 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
1099 if (SLJIT_UNLIKELY(compiler->skip_checks)) {
1100 compiler->skip_checks = 0;
1112 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1113 fprintf(compiler->verbose, " %s%s%s%s%s%s%s%s ", op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], !(op & SLJIT_I32_OP) ? "" : "32",
1116 sljit_verbose_param(compiler, dst, dstw);
1117 fprintf(compiler->verbose, ", ");
1118 sljit_verbose_param(compiler, src1, src1w);
1119 fprintf(compiler->verbose, ", ");
1120 sljit_verbose_param(compiler, src2, src2w);
1121 fprintf(compiler->verbose, "\n");
1145 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_custom(struct sljit_compiler *compiler,
1152 SLJIT_UNUSED_ARG(compiler);
1167 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1168 fprintf(compiler->verbose, " op_custom");
1170 fprintf(compiler->verbose, " 0x%x", ((sljit_u8*)instruction)[i]);
1171 fprintf(compiler->verbose, "\n");
1177 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
1181 if (SLJIT_UNLIKELY(compiler->skip_checks)) {
1182 compiler->skip_checks = 0;
1194 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1196 fprintf(compiler->verbose, " %s%s ", fop1_names[SLJIT_CONV_F64_FROM_F32 - SLJIT_FOP1_BASE],
1199 fprintf(compiler->verbose, " %s%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE],
1202 sljit_verbose_fparam(compiler, dst, dstw);
1203 fprintf(compiler->verbose, ", ");
1204 sljit_verbose_fparam(compiler, src, srcw);
1205 fprintf(compiler->verbose, "\n");
1211 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op,
1215 if (SLJIT_UNLIKELY(compiler->skip_checks)) {
1216 compiler->skip_checks = 0;
1228 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1229 fprintf(compiler->verbose, " %s%s%s%s ", fop1_names[SLJIT_CMP_F64 - SLJIT_FOP1_BASE], (op & SLJIT_F32_OP) ? ".f32" : ".f64",
1231 sljit_verbose_fparam(compiler, src1, src1w);
1232 fprintf(compiler->verbose, ", ");
1233 sljit_verbose_fparam(compiler, src2, src2w);
1234 fprintf(compiler->verbose, "\n");
1240 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op,
1244 if (SLJIT_UNLIKELY(compiler->skip_checks)) {
1245 compiler->skip_checks = 0;
1257 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1258 fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE],
1261 sljit_verbose_param(compiler, dst, dstw);
1262 fprintf(compiler->verbose, ", ");
1263 sljit_verbose_fparam(compiler, src, srcw);
1264 fprintf(compiler->verbose, "\n");
1270 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op,
1274 if (SLJIT_UNLIKELY(compiler->skip_checks)) {
1275 compiler->skip_checks = 0;
1287 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1288 fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE],
1291 sljit_verbose_fparam(compiler, dst, dstw);
1292 fprintf(compiler->verbose, ", ");
1293 sljit_verbose_param(compiler, src, srcw);
1294 fprintf(compiler->verbose, "\n");
1300 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
1314 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1315 fprintf(compiler->verbose, " %s%s ", fop2_names[GET_OPCODE(op) - SLJIT_FOP2_BASE], (op & SLJIT_F32_OP) ? ".f32" : ".f64");
1316 sljit_verbose_fparam(compiler, dst, dstw);
1317 fprintf(compiler->verbose, ", ");
1318 sljit_verbose_fparam(compiler, src1, src1w);
1319 fprintf(compiler->verbose, ", ");
1320 sljit_verbose_fparam(compiler, src2, src2w);
1321 fprintf(compiler->verbose, "\n");
1327 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_label(struct sljit_compiler *compiler)
1329 SLJIT_UNUSED_ARG(compiler);
1332 if (SLJIT_UNLIKELY(!!compiler->verbose))
1333 fprintf(compiler->verbose, "label:\n");
1338 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
1340 if (SLJIT_UNLIKELY(compiler->skip_checks)) {
1341 compiler->skip_checks = 0;
1349 CHECK_ARGUMENT((type & 0xff) <= SLJIT_CALL0 || ((type & 0xff) - SLJIT_CALL0) <= compiler->scratches);
1352 if (SLJIT_UNLIKELY(!!compiler->verbose))
1353 fprintf(compiler->verbose, " jump%s %s%s\n", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r",
1359 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s32 type,
1370 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1371 fprintf(compiler->verbose, " cmp%s %s%s, ", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r",
1373 sljit_verbose_param(compiler, src1, src1w);
1374 fprintf(compiler->verbose, ", ");
1375 sljit_verbose_param(compiler, src2, src2w);
1376 fprintf(compiler->verbose, "\n");
1382 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_s32 type,
1394 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1395 fprintf(compiler->verbose, " fcmp%s %s%s, ", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r",
1397 sljit_verbose_fparam(compiler, src1, src1w);
1398 fprintf(compiler->verbose, ", ");
1399 sljit_verbose_fparam(compiler, src2, src2w);
1400 fprintf(compiler->verbose, "\n");
1406 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
1408 if (SLJIT_UNLIKELY(compiler->skip_checks)) {
1409 compiler->skip_checks = 0;
1415 CHECK_ARGUMENT(type <= SLJIT_CALL0 || (type - SLJIT_CALL0) <= compiler->scratches);
1419 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1420 fprintf(compiler->verbose, " ijump.%s ", jump_names[type]);
1421 sljit_verbose_param(compiler, src, srcw);
1422 fprintf(compiler->verbose, "\n");
1428 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
1448 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1449 fprintf(compiler->verbose, " flags %s%s%s%s, ",
1453 sljit_verbose_param(compiler, dst, dstw);
1455 fprintf(compiler->verbose, ", ");
1456 sljit_verbose_param(compiler, src, srcw);
1458 fprintf(compiler->verbose, ", %s%s\n", jump_names[type & 0xff], JUMP_POSTFIX(type));
1464 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset)
1472 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1473 fprintf(compiler->verbose, " local_base ");
1474 sljit_verbose_param(compiler, dst, dstw);
1475 fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", offset);
1481 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
1489 if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1490 fprintf(compiler->verbose, " const ");
1491 sljit_verbose_param(compiler, dst, dstw);
1492 fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", init_value);
1500 compiler, op, dst, dstw, src, srcw) \
1505 CHECK(check_sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw)); \
1508 return sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw); \
1511 CHECK(check_sljit_emit_fop1_conv_sw_from_f64(compiler, op, dst, dstw, src, srcw)); \
1514 return sljit_emit_fop1_conv_sw_from_f64(compiler, op, dst, dstw, src, srcw); \
1516 CHECK(check_sljit_emit_fop1_conv_f64_from_sw(compiler, op, dst, dstw, src, srcw)); \
1519 return sljit_emit_fop1_conv_f64_from_sw(compiler, op, dst, dstw, src, srcw); \
1521 CHECK(check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw)); \
1525 static SLJIT_INLINE sljit_s32 emit_mov_before_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
1542 compiler->skip_checks = 1;
1544 return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw);
1595 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s32 type,
1604 CHECK_PTR(check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w));
1616 return emit_cmp_to0(compiler, type, src1, src1w);
1666 compiler->skip_checks = 1;
1668 PTR_FAIL_IF(sljit_emit_op2(compiler, SLJIT_SUB | flags | (type & SLJIT_I32_OP),
1672 compiler->skip_checks = 1;
1674 return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
1677 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_s32 type,
1684 CHECK_PTR(check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w));
1693 compiler->skip_checks = 1;
1695 sljit_emit_fop1(compiler, SLJIT_CMP_F64 | flags, src1, src1w, src2, src2w);
1699 compiler->skip_checks = 1;
1701 return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
1708 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset)
1711 CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset));
1716 compiler->skip_checks = 1;
1719 return sljit_emit_op2(compiler, SLJIT_ADD | SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, SLJIT_IMM, offset);
1720 return sljit_emit_op1(compiler, SLJIT_MOV, dst, dstw, SLJIT_SP, 0);
1740 SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler)
1742 SLJIT_UNUSED_ARG(compiler);
1746 SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_s32 size)
1748 SLJIT_UNUSED_ARG(compiler);
1755 SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose)
1757 SLJIT_UNUSED_ARG(compiler);
1763 SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
1765 SLJIT_UNUSED_ARG(compiler);
1776 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
1780 SLJIT_UNUSED_ARG(compiler);
1792 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
1796 SLJIT_UNUSED_ARG(compiler);
1808 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
1810 SLJIT_UNUSED_ARG(compiler);
1818 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
1820 SLJIT_UNUSED_ARG(compiler);
1827 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
1829 SLJIT_UNUSED_ARG(compiler);
1836 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
1838 SLJIT_UNUSED_ARG(compiler);
1844 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
1848 SLJIT_UNUSED_ARG(compiler);
1858 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
1863 SLJIT_UNUSED_ARG(compiler);
1881 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
1884 SLJIT_UNUSED_ARG(compiler);
1897 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
1901 SLJIT_UNUSED_ARG(compiler);
1911 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
1916 SLJIT_UNUSED_ARG(compiler);
1928 SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
1930 SLJIT_UNUSED_ARG(compiler);
1935 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
1937 SLJIT_UNUSED_ARG(compiler);
1943 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s32 type,
1947 SLJIT_UNUSED_ARG(compiler);
1957 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_s32 type,
1961 SLJIT_UNUSED_ARG(compiler);
1985 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
1987 SLJIT_UNUSED_ARG(compiler);
1995 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
2000 SLJIT_UNUSED_ARG(compiler);
2011 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset)
2013 SLJIT_UNUSED_ARG(compiler);
2021 SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw initval)
2023 SLJIT_UNUSED_ARG(compiler);