Lines Matching refs:compiler
31 if (SLJIT_UNLIKELY(compiler->error)) \
32 return compiler->error; \
37 if (SLJIT_UNLIKELY(compiler->error)) \
43 if (SLJIT_UNLIKELY(compiler->error)) \
50 return compiler->error; \
62 compiler->error = SLJIT_ERR_ALLOC_FAILED; \
70 compiler->error = SLJIT_ERR_ALLOC_FAILED; \
78 compiler->error = SLJIT_ERR_EX_ALLOC_FAILED; \
297 (i) += compiler->locals_offset;
335 …struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(sizeof(struct sljit_compile… in sljit_create_compiler() local
336 if (!compiler) in sljit_create_compiler()
338 SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler)); in sljit_create_compiler()
355 compiler->error = SLJIT_SUCCESS; in sljit_create_compiler()
357 compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE); in sljit_create_compiler()
358 compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE); in sljit_create_compiler()
360 if (!compiler->buf || !compiler->abuf) { in sljit_create_compiler()
361 if (compiler->buf) in sljit_create_compiler()
362 SLJIT_FREE(compiler->buf); in sljit_create_compiler()
363 if (compiler->abuf) in sljit_create_compiler()
364 SLJIT_FREE(compiler->abuf); in sljit_create_compiler()
365 SLJIT_FREE(compiler); in sljit_create_compiler()
369 compiler->buf->next = NULL; in sljit_create_compiler()
370 compiler->buf->used_size = 0; in sljit_create_compiler()
371 compiler->abuf->next = NULL; in sljit_create_compiler()
372 compiler->abuf->used_size = 0; in sljit_create_compiler()
374 compiler->scratches = -1; in sljit_create_compiler()
375 compiler->saveds = -1; in sljit_create_compiler()
376 compiler->fscratches = -1; in sljit_create_compiler()
377 compiler->fsaveds = -1; in sljit_create_compiler()
380 compiler->args = -1; in sljit_create_compiler()
384 …compiler->cpool = (sljit_uw*)SLJIT_MALLOC(CPOOL_SIZE * sizeof(sljit_uw) + CPOOL_SIZE * sizeof(slji… in sljit_create_compiler()
385 if (!compiler->cpool) { in sljit_create_compiler()
386 SLJIT_FREE(compiler->buf); in sljit_create_compiler()
387 SLJIT_FREE(compiler->abuf); in sljit_create_compiler()
388 SLJIT_FREE(compiler); in sljit_create_compiler()
391 compiler->cpool_unique = (sljit_ub*)(compiler->cpool + CPOOL_SIZE); in sljit_create_compiler()
392 compiler->cpool_diff = 0xffffffff; in sljit_create_compiler()
396 compiler->delay_slot = UNMOVABLE_INS; in sljit_create_compiler()
400 compiler->delay_slot = UNMOVABLE_INS; in sljit_create_compiler()
410 return compiler; in sljit_create_compiler()
413 SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler) in sljit_free_compiler() argument
418 buf = compiler->buf; in sljit_free_compiler()
425 buf = compiler->abuf; in sljit_free_compiler()
433 SLJIT_FREE(compiler->cpool); in sljit_free_compiler()
435 SLJIT_FREE(compiler); in sljit_free_compiler()
480 static void* ensure_buf(struct sljit_compiler *compiler, sljit_uw size) in ensure_buf() argument
486 …if (compiler->buf->used_size + size <= (BUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fr… in ensure_buf()
487 ret = compiler->buf->memory + compiler->buf->used_size; in ensure_buf()
488 compiler->buf->used_size += size; in ensure_buf()
493 new_frag->next = compiler->buf; in ensure_buf()
494 compiler->buf = new_frag; in ensure_buf()
499 static void* ensure_abuf(struct sljit_compiler *compiler, sljit_uw size) in ensure_abuf() argument
505 …if (compiler->abuf->used_size + size <= (ABUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_… in ensure_abuf()
506 ret = compiler->abuf->memory + compiler->abuf->used_size; in ensure_abuf()
507 compiler->abuf->used_size += size; in ensure_abuf()
512 new_frag->next = compiler->abuf; in ensure_abuf()
513 compiler->abuf = new_frag; in ensure_abuf()
518 SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_si size) in sljit_alloc_memory() argument
531 return ensure_abuf(compiler, size); in sljit_alloc_memory()
534 static SLJIT_INLINE void reverse_buf(struct sljit_compiler *compiler) in reverse_buf() argument
536 struct sljit_memory_fragment *buf = compiler->buf; in reverse_buf()
547 compiler->buf = prev; in reverse_buf()
550 static SLJIT_INLINE void set_label(struct sljit_label *label, struct sljit_compiler *compiler) in set_label() argument
553 label->size = compiler->size; in set_label()
554 if (compiler->last_label) in set_label()
555 compiler->last_label->next = label; in set_label()
557 compiler->labels = label; in set_label()
558 compiler->last_label = label; in set_label()
561 static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, sljit_s… in set_jump() argument
565 if (compiler->last_jump) in set_jump()
566 compiler->last_jump->next = jump; in set_jump()
568 compiler->jumps = jump; in set_jump()
569 compiler->last_jump = jump; in set_jump()
572 static SLJIT_INLINE void set_const(struct sljit_const *const_, struct sljit_compiler *compiler) in set_const() argument
575 const_->addr = compiler->size; in set_const()
576 if (compiler->last_const) in set_const()
577 compiler->last_const->next = const_; in set_const()
579 compiler->consts = const_; in set_const()
580 compiler->last_const = const_; in set_const()
649 ((r) >= SLJIT_R0 && (r) < (SLJIT_R0 + compiler->scratches)) || \
650 ((r) > (SLJIT_S0 - compiler->saveds) && (r) <= SLJIT_S0))
660 SLJIT_ASSERT(compiler->scratches != -1 && compiler->saveds != -1); \
666 SLJIT_ASSERT((i) >= 0 && (i) < compiler->logical_local_size); \
681 SLJIT_ASSERT(compiler->scratches != -1 && compiler->saveds != -1); \
685 SLJIT_ASSERT((i) >= 0 && (i) < compiler->logical_local_size); \
700 SLJIT_ASSERT(compiler->fscratches != -1 && compiler->fsaveds != -1); \
701 if (((p) >= SLJIT_FR0 && (p) < (SLJIT_FR0 + compiler->fscratches)) || \
702 ((p) > (SLJIT_FS0 - compiler->fsaveds) && (p) <= SLJIT_FS0)) \
705 SLJIT_ASSERT((i) >= 0 && (i) < compiler->logical_local_size); \
732 SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) in sljit_compiler_verbose() argument
734 compiler->verbose = verbose; in sljit_compiler_verbose()
747 #define sljit_verbose_reg(compiler, r) \ argument
749 if ((r) < (SLJIT_R0 + compiler->scratches)) \
750 fprintf(compiler->verbose, "r%d", (r) - SLJIT_R0); \
752 fprintf(compiler->verbose, "s%d", SLJIT_NUMBER_OF_REGISTERS - (r)); \
755 #define sljit_verbose_param(compiler, p, i) \ argument
757 fprintf(compiler->verbose, "#%" SLJIT_PRINT_D "d", (i)); \
760 fputc('[', compiler->verbose); \
761 sljit_verbose_reg(compiler, (p) & REG_MASK); \
763 fprintf(compiler->verbose, " + "); \
764 sljit_verbose_reg(compiler, OFFS_REG(p)); \
766 fprintf(compiler->verbose, " * %d", 1 << (i)); \
769 fprintf(compiler->verbose, " + %" SLJIT_PRINT_D "d", (i)); \
770 fputc(']', compiler->verbose); \
773 fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); \
775 sljit_verbose_reg(compiler, p); \
777 fprintf(compiler->verbose, "unused");
779 #define sljit_verbose_fparam(compiler, p, i) \ argument
782 fputc('[', compiler->verbose); \
783 sljit_verbose_reg(compiler, (p) & REG_MASK); \
785 fprintf(compiler->verbose, " + "); \
786 sljit_verbose_reg(compiler, OFFS_REG(p)); \
788 fprintf(compiler->verbose, "%d", 1 << (i)); \
791 fprintf(compiler->verbose, "%" SLJIT_PRINT_D "d", (i)); \
792 fputc(']', compiler->verbose); \
795 fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); \
798 if ((p) < (SLJIT_FR0 + compiler->fscratches)) \
799 fprintf(compiler->verbose, "fr%d", (p) - SLJIT_FR0); \
801 fprintf(compiler->verbose, "fs%d", SLJIT_NUMBER_OF_FLOAT_REGISTERS - (p)); \
855 static SLJIT_INLINE void check_sljit_generate_code(struct sljit_compiler *compiler) in check_sljit_generate_code() argument
861 SLJIT_UNUSED_ARG(compiler); in check_sljit_generate_code()
863 SLJIT_ASSERT(compiler->size > 0); in check_sljit_generate_code()
865 jump = compiler->jumps; in check_sljit_generate_code()
874 static SLJIT_INLINE void check_sljit_emit_enter(struct sljit_compiler *compiler, in check_sljit_emit_enter() argument
879 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_enter()
899 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_emit_enter()
900 …fprintf(compiler->verbose, " enter options:none args:%d scratches:%d saveds:%d fscratches:%d fsav… in check_sljit_emit_enter()
905 static SLJIT_INLINE void check_sljit_set_context(struct sljit_compiler *compiler, in check_sljit_set_context() argument
910 SLJIT_UNUSED_ARG(compiler); in check_sljit_set_context()
920 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_set_context()
921 compiler->skip_checks = 0; in check_sljit_set_context()
937 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_set_context()
938 …fprintf(compiler->verbose, " set_context options:none args:%d scratches:%d saveds:%d fscratches:%… in check_sljit_set_context()
943 static SLJIT_INLINE void check_sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, slji… in check_sljit_emit_return() argument
946 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_return()
960 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_return()
962 fprintf(compiler->verbose, " return\n"); in check_sljit_emit_return()
964 fprintf(compiler->verbose, " return.%s ", op1_names[op - SLJIT_OP1_BASE]); in check_sljit_emit_return()
965 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_return()
966 fprintf(compiler->verbose, "\n"); in check_sljit_emit_return()
972 static SLJIT_INLINE void check_sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst,… in check_sljit_emit_fast_enter() argument
975 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_fast_enter()
983 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fast_enter()
984 fprintf(compiler->verbose, " fast_enter "); in check_sljit_emit_fast_enter()
985 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_fast_enter()
986 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fast_enter()
991 static SLJIT_INLINE void check_sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src… in check_sljit_emit_fast_return() argument
994 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_fast_return()
1002 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fast_return()
1003 fprintf(compiler->verbose, " fast_return "); in check_sljit_emit_fast_return()
1004 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_fast_return()
1005 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fast_return()
1010 static SLJIT_INLINE void check_sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op) in check_sljit_emit_op0() argument
1013 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_op0()
1018 SLJIT_ASSERT(op < SLJIT_UMUL || compiler->scratches >= 2); in check_sljit_emit_op0()
1020 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_emit_op0()
1021 …fprintf(compiler->verbose, " %s%s\n", !(op & SLJIT_INT_OP) ? "" : "i", op0_names[GET_OPCODE(op) -… in check_sljit_emit_op0()
1025 static SLJIT_INLINE void check_sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op, in check_sljit_emit_op1() argument
1030 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_op1()
1038 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_op1()
1039 compiler->skip_checks = 0; in check_sljit_emit_op1()
1052 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op1()
1053 …fprintf(compiler->verbose, " %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op1_names[GET_O… in check_sljit_emit_op1()
1056 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_op1()
1057 fprintf(compiler->verbose, ", "); in check_sljit_emit_op1()
1058 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_op1()
1059 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op1()
1064 static SLJIT_INLINE void check_sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op, in check_sljit_emit_op2() argument
1070 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_op2()
1080 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_op2()
1081 compiler->skip_checks = 0; in check_sljit_emit_op2()
1094 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op2()
1095 …fprintf(compiler->verbose, " %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op2_names[GET_O… in check_sljit_emit_op2()
1098 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_op2()
1099 fprintf(compiler->verbose, ", "); in check_sljit_emit_op2()
1100 sljit_verbose_param(compiler, src1, src1w); in check_sljit_emit_op2()
1101 fprintf(compiler->verbose, ", "); in check_sljit_emit_op2()
1102 sljit_verbose_param(compiler, src2, src2w); in check_sljit_emit_op2()
1103 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op2()
1120 static SLJIT_INLINE void check_sljit_emit_op_custom(struct sljit_compiler *compiler, in check_sljit_emit_op_custom() argument
1123 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_op_custom()
1129 #define SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw) \ argument
1135 check_sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw); \
1138 return sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw); \
1141 check_sljit_emit_fop1_convw_fromd(compiler, op, dst, dstw, src, srcw); \
1144 return sljit_emit_fop1_convw_fromd(compiler, op, dst, dstw, src, srcw); \
1146 check_sljit_emit_fop1_convd_fromw(compiler, op, dst, dstw, src, srcw); \
1149 return sljit_emit_fop1_convd_fromw(compiler, op, dst, dstw, src, srcw); \
1151 check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw); \
1155 static SLJIT_INLINE void check_sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op, in check_sljit_emit_fop1() argument
1160 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_fop1()
1168 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1()
1169 compiler->skip_checks = 0; in check_sljit_emit_fop1()
1181 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1()
1182 fprintf(compiler->verbose, " %s%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1()
1186 sljit_verbose_fparam(compiler, dst, dstw); in check_sljit_emit_fop1()
1187 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1()
1188 sljit_verbose_fparam(compiler, src, srcw); in check_sljit_emit_fop1()
1189 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1()
1194 static SLJIT_INLINE void check_sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_si op, in check_sljit_emit_fop1_cmp() argument
1199 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_fop1_cmp()
1207 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1_cmp()
1208 compiler->skip_checks = 0; in check_sljit_emit_fop1_cmp()
1220 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1_cmp()
1221 …fprintf(compiler->verbose, " %s%s%s%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], (op & SLJI… in check_sljit_emit_fop1_cmp()
1223 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fop1_cmp()
1224 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1_cmp()
1225 sljit_verbose_fparam(compiler, src2, src2w); in check_sljit_emit_fop1_cmp()
1226 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1_cmp()
1231 static SLJIT_INLINE void check_sljit_emit_fop1_convw_fromd(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_fop1_convw_fromd() argument
1236 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_fop1_convw_fromd()
1244 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1_convw_fromd()
1245 compiler->skip_checks = 0; in check_sljit_emit_fop1_convw_fromd()
1257 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1_convw_fromd()
1258 fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1_convw_fromd()
1261 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_fop1_convw_fromd()
1262 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1_convw_fromd()
1263 sljit_verbose_fparam(compiler, src, srcw); in check_sljit_emit_fop1_convw_fromd()
1264 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1_convw_fromd()
1269 static SLJIT_INLINE void check_sljit_emit_fop1_convd_fromw(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_fop1_convd_fromw() argument
1274 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_fop1_convd_fromw()
1282 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1_convd_fromw()
1283 compiler->skip_checks = 0; in check_sljit_emit_fop1_convd_fromw()
1295 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1_convd_fromw()
1296 fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1_convd_fromw()
1299 sljit_verbose_fparam(compiler, dst, dstw); in check_sljit_emit_fop1_convd_fromw()
1300 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1_convd_fromw()
1301 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_fop1_convd_fromw()
1302 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1_convd_fromw()
1307 static SLJIT_INLINE void check_sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op, in check_sljit_emit_fop2() argument
1313 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_fop2()
1331 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop2()
1332 …fprintf(compiler->verbose, " %s%s ", fop2_names[GET_OPCODE(op) - SLJIT_FOP2_BASE], (op & SLJIT_SI… in check_sljit_emit_fop2()
1333 sljit_verbose_fparam(compiler, dst, dstw); in check_sljit_emit_fop2()
1334 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop2()
1335 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fop2()
1336 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop2()
1337 sljit_verbose_fparam(compiler, src2, src2w); in check_sljit_emit_fop2()
1338 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop2()
1343 static SLJIT_INLINE void check_sljit_emit_label(struct sljit_compiler *compiler) in check_sljit_emit_label() argument
1346 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_label()
1349 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_emit_label()
1350 fprintf(compiler->verbose, "label:\n"); in check_sljit_emit_label()
1354 static SLJIT_INLINE void check_sljit_emit_jump(struct sljit_compiler *compiler, sljit_si type) in check_sljit_emit_jump() argument
1357 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_jump()
1361 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_jump()
1362 compiler->skip_checks = 0; in check_sljit_emit_jump()
1370 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_emit_jump()
1371 …fprintf(compiler->verbose, " jump%s.%s\n", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", jump_name… in check_sljit_emit_jump()
1375 static SLJIT_INLINE void check_sljit_emit_cmp(struct sljit_compiler *compiler, sljit_si type, in check_sljit_emit_cmp() argument
1379 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_cmp()
1393 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_cmp()
1394 …fprintf(compiler->verbose, " %scmp%s.%s ", !(type & SLJIT_INT_OP) ? "" : "i", !(type & SLJIT_REWR… in check_sljit_emit_cmp()
1395 sljit_verbose_param(compiler, src1, src1w); in check_sljit_emit_cmp()
1396 fprintf(compiler->verbose, ", "); in check_sljit_emit_cmp()
1397 sljit_verbose_param(compiler, src2, src2w); in check_sljit_emit_cmp()
1398 fprintf(compiler->verbose, "\n"); in check_sljit_emit_cmp()
1403 static SLJIT_INLINE void check_sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_si type, in check_sljit_emit_fcmp() argument
1407 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_fcmp()
1422 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fcmp()
1423 fprintf(compiler->verbose, " %scmp%s.%s ", (type & SLJIT_SINGLE_OP) ? "s" : "d", in check_sljit_emit_fcmp()
1425 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fcmp()
1426 fprintf(compiler->verbose, ", "); in check_sljit_emit_fcmp()
1427 sljit_verbose_fparam(compiler, src2, src2w); in check_sljit_emit_fcmp()
1428 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fcmp()
1433 static SLJIT_INLINE void check_sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, slj… in check_sljit_emit_ijump() argument
1436 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_ijump()
1442 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_ijump()
1443 compiler->skip_checks = 0; in check_sljit_emit_ijump()
1453 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_ijump()
1454 fprintf(compiler->verbose, " ijump.%s ", jump_names[type]); in check_sljit_emit_ijump()
1455 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_ijump()
1456 fprintf(compiler->verbose, "\n"); in check_sljit_emit_ijump()
1461 static SLJIT_INLINE void check_sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op, in check_sljit_emit_op_flags() argument
1467 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_op_flags()
1489 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op_flags()
1490 fprintf(compiler->verbose, " %sflags.%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", in check_sljit_emit_op_flags()
1493 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_op_flags()
1495 fprintf(compiler->verbose, ", "); in check_sljit_emit_op_flags()
1496 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_op_flags()
1498 fprintf(compiler->verbose, ", %s\n", jump_names[type]); in check_sljit_emit_op_flags()
1503 static SLJIT_INLINE void check_sljit_get_local_base(struct sljit_compiler *compiler, sljit_si dst, … in check_sljit_get_local_base() argument
1505 SLJIT_UNUSED_ARG(compiler); in check_sljit_get_local_base()
1514 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_get_local_base()
1515 fprintf(compiler->verbose, " local_base "); in check_sljit_get_local_base()
1516 sljit_verbose_param(compiler, dst, dstw); in check_sljit_get_local_base()
1517 fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", offset); in check_sljit_get_local_base()
1522 static SLJIT_INLINE void check_sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, slji… in check_sljit_emit_const() argument
1525 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_const()
1534 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_const()
1535 fprintf(compiler->verbose, " const "); in check_sljit_emit_const()
1536 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_const()
1537 fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", init_value); in check_sljit_emit_const()
1542 static SLJIT_INLINE sljit_si emit_mov_before_return(struct sljit_compiler *compiler, sljit_si op, s… in emit_mov_before_return() argument
1558 compiler->skip_checks = 1; in emit_mov_before_return()
1560 return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw); in emit_mov_before_return()
1611 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s… in sljit_emit_cmp() argument
1620 check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w); in sljit_emit_cmp()
1632 return emit_cmp_to0(compiler, type, src1, src1w); in sljit_emit_cmp()
1681 compiler->skip_checks = 1; in sljit_emit_cmp()
1683 PTR_FAIL_IF(sljit_emit_op2(compiler, SLJIT_SUB | flags | (type & SLJIT_INT_OP), in sljit_emit_cmp()
1686 compiler->skip_checks = 1; in sljit_emit_cmp()
1688 return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP)); in sljit_emit_cmp()
1691 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_… in sljit_emit_fcmp() argument
1697 check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w); in sljit_emit_fcmp()
1705 compiler->skip_checks = 1; in sljit_emit_fcmp()
1707 sljit_emit_fop1(compiler, SLJIT_CMPD | flags, src1, src1w, src2, src2w); in sljit_emit_fcmp()
1710 compiler->skip_checks = 1; in sljit_emit_fcmp()
1712 return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP)); in sljit_emit_fcmp()
1719 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_local_base(struct sljit_compiler *compiler, sljit_si ds… in sljit_get_local_base() argument
1722 check_sljit_get_local_base(compiler, dst, dstw, offset); in sljit_get_local_base()
1726 compiler->skip_checks = 1; in sljit_get_local_base()
1729 …return sljit_emit_op2(compiler, SLJIT_ADD | SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, SLJIT_IMM, o… in sljit_get_local_base()
1730 return sljit_emit_op1(compiler, SLJIT_MOV, dst, dstw, SLJIT_SP, 0); in sljit_get_local_base()
1750 SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler) in sljit_free_compiler() argument
1752 SLJIT_UNUSED_ARG(compiler); in sljit_free_compiler()
1756 SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_si size) in sljit_alloc_memory() argument
1758 SLJIT_UNUSED_ARG(compiler); in sljit_alloc_memory()
1765 SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) in sljit_compiler_verbose() argument
1767 SLJIT_UNUSED_ARG(compiler); in sljit_compiler_verbose()
1773 SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) in sljit_generate_code() argument
1775 SLJIT_UNUSED_ARG(compiler); in sljit_generate_code()
1786 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, in sljit_emit_enter() argument
1790 SLJIT_UNUSED_ARG(compiler); in sljit_emit_enter()
1802 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
1806 SLJIT_UNUSED_ARG(compiler); in sljit_set_context()
1817 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, s… in sljit_emit_return() argument
1819 SLJIT_UNUSED_ARG(compiler); in sljit_emit_return()
1827 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si d… in sljit_emit_fast_enter() argument
1829 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fast_enter()
1836 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fast_return() argument
1838 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fast_return()
1845 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op) in sljit_emit_op0() argument
1847 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op0()
1853 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op1() argument
1857 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op1()
1867 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op2() argument
1872 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op2()
1890 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler, in sljit_emit_op_custom() argument
1893 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op_custom()
1906 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1() argument
1910 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fop1()
1920 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop2() argument
1925 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fop2()
1937 SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) in sljit_emit_label() argument
1939 SLJIT_UNUSED_ARG(compiler); in sljit_emit_label()
1944 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in sljit_emit_jump() argument
1946 SLJIT_UNUSED_ARG(compiler); in sljit_emit_jump()
1952 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s… in sljit_emit_cmp() argument
1956 SLJIT_UNUSED_ARG(compiler); in sljit_emit_cmp()
1966 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_… in sljit_emit_fcmp() argument
1970 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fcmp()
1994 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, … in sljit_emit_ijump() argument
1996 SLJIT_UNUSED_ARG(compiler); in sljit_emit_ijump()
2004 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op_flags() argument
2009 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op_flags()
2020 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_local_base(struct sljit_compiler *compiler, sljit_si ds… in sljit_get_local_base() argument
2022 SLJIT_UNUSED_ARG(compiler); in sljit_get_local_base()
2030 SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, slji… in sljit_emit_const() argument
2032 SLJIT_UNUSED_ARG(compiler); in sljit_emit_const()