Lines Matching refs:compiler

45 		if (SLJIT_UNLIKELY(compiler->error)) \
46 return compiler->error; \
51 if (SLJIT_UNLIKELY(compiler->error)) \
58 return compiler->error; \
70 compiler->error = SLJIT_ERR_ALLOC_FAILED; \
78 compiler->error = SLJIT_ERR_ALLOC_FAILED; \
86 compiler->error = SLJIT_ERR_EX_ALLOC_FAILED; \
312 compiler->error = SLJIT_ERR_BAD_ARGUMENT; \
320 compiler->error = SLJIT_ERR_BAD_ARGUMENT; \
376 …struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(sizeof(struct sljit_compile… in sljit_create_compiler() local
377 if (!compiler) in sljit_create_compiler()
379 SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler)); in sljit_create_compiler()
396 compiler->error = SLJIT_SUCCESS; in sljit_create_compiler()
398 compiler->allocator_data = allocator_data; in sljit_create_compiler()
399 compiler->exec_allocator_data = exec_allocator_data; in sljit_create_compiler()
400 compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE, allocator_data); in sljit_create_compiler()
401 compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE, allocator_data); in sljit_create_compiler()
403 if (!compiler->buf || !compiler->abuf) { in sljit_create_compiler()
404 if (compiler->buf) in sljit_create_compiler()
405 SLJIT_FREE(compiler->buf, allocator_data); in sljit_create_compiler()
406 if (compiler->abuf) in sljit_create_compiler()
407 SLJIT_FREE(compiler->abuf, allocator_data); in sljit_create_compiler()
408 SLJIT_FREE(compiler, allocator_data); in sljit_create_compiler()
412 compiler->buf->next = NULL; in sljit_create_compiler()
413 compiler->buf->used_size = 0; in sljit_create_compiler()
414 compiler->abuf->next = NULL; in sljit_create_compiler()
415 compiler->abuf->used_size = 0; in sljit_create_compiler()
417 compiler->scratches = -1; in sljit_create_compiler()
418 compiler->saveds = -1; in sljit_create_compiler()
419 compiler->fscratches = -1; in sljit_create_compiler()
420 compiler->fsaveds = -1; in sljit_create_compiler()
421 compiler->local_size = -1; in sljit_create_compiler()
424 compiler->args_size = -1; in sljit_create_compiler()
428 compiler->cpool = (sljit_uw*)SLJIT_MALLOC(CPOOL_SIZE * sizeof(sljit_uw) in sljit_create_compiler()
430 if (!compiler->cpool) { in sljit_create_compiler()
431 SLJIT_FREE(compiler->buf, allocator_data); in sljit_create_compiler()
432 SLJIT_FREE(compiler->abuf, allocator_data); in sljit_create_compiler()
433 SLJIT_FREE(compiler, allocator_data); in sljit_create_compiler()
436 compiler->cpool_unique = (sljit_u8*)(compiler->cpool + CPOOL_SIZE); in sljit_create_compiler()
437 compiler->cpool_diff = 0xffffffff; in sljit_create_compiler()
441 compiler->delay_slot = UNMOVABLE_INS; in sljit_create_compiler()
446 compiler->last_flags = 0; in sljit_create_compiler()
447 compiler->last_return = -1; in sljit_create_compiler()
448 compiler->logical_local_size = 0; in sljit_create_compiler()
458 return compiler; in sljit_create_compiler()
461 SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler) in sljit_free_compiler() argument
465 void *allocator_data = compiler->allocator_data; in sljit_free_compiler()
468 buf = compiler->buf; in sljit_free_compiler()
475 buf = compiler->abuf; in sljit_free_compiler()
483 SLJIT_FREE(compiler->cpool, allocator_data); in sljit_free_compiler()
485 SLJIT_FREE(compiler, allocator_data); in sljit_free_compiler()
488 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_compiler_memory_error(struct sljit_compiler *compiler) in sljit_set_compiler_memory_error() argument
490 if (compiler->error == SLJIT_SUCCESS) in sljit_set_compiler_memory_error()
491 compiler->error = SLJIT_ERR_ALLOC_FAILED; in sljit_set_compiler_memory_error()
547 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_current_flags(struct sljit_compiler *compiler, sljit_s32 cu… in sljit_set_current_flags() argument
549 SLJIT_UNUSED_ARG(compiler); in sljit_set_current_flags()
553 compiler->status_flags_state = current_flags; in sljit_set_current_flags()
557 compiler->last_flags = 0; in sljit_set_current_flags()
559 compiler->last_flags = GET_FLAG_TYPE(current_flags) | (current_flags & (SLJIT_32 | SLJIT_SET_Z)); in sljit_set_current_flags()
568 static void* ensure_buf(struct sljit_compiler *compiler, sljit_uw size) in ensure_buf() argument
574 …if (compiler->buf->used_size + size <= (BUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fr… in ensure_buf()
575 ret = compiler->buf->memory + compiler->buf->used_size; in ensure_buf()
576 compiler->buf->used_size += size; in ensure_buf()
579 new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE, compiler->allocator_data); in ensure_buf()
581 new_frag->next = compiler->buf; in ensure_buf()
582 compiler->buf = new_frag; in ensure_buf()
587 static void* ensure_abuf(struct sljit_compiler *compiler, sljit_uw size) in ensure_abuf() argument
593 …if (compiler->abuf->used_size + size <= (ABUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_… in ensure_abuf()
594 ret = compiler->abuf->memory + compiler->abuf->used_size; in ensure_abuf()
595 compiler->abuf->used_size += size; in ensure_abuf()
598 new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE, compiler->allocator_data); in ensure_abuf()
600 new_frag->next = compiler->abuf; in ensure_abuf()
601 compiler->abuf = new_frag; in ensure_abuf()
606 SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_s32 size) in sljit_alloc_memory() argument
619 return ensure_abuf(compiler, (sljit_uw)size); in sljit_alloc_memory()
622 static SLJIT_INLINE void reverse_buf(struct sljit_compiler *compiler) in reverse_buf() argument
624 struct sljit_memory_fragment *buf = compiler->buf; in reverse_buf()
635 compiler->buf = prev; in reverse_buf()
664 static SLJIT_INLINE void set_emit_enter(struct sljit_compiler *compiler, in set_emit_enter() argument
671 compiler->options = options; in set_emit_enter()
672 compiler->scratches = scratches; in set_emit_enter()
673 compiler->saveds = saveds; in set_emit_enter()
674 compiler->fscratches = fscratches; in set_emit_enter()
675 compiler->fsaveds = fsaveds; in set_emit_enter()
677 compiler->last_return = args & SLJIT_ARG_MASK; in set_emit_enter()
678 compiler->logical_local_size = local_size; in set_emit_enter()
682 static SLJIT_INLINE void set_set_context(struct sljit_compiler *compiler, in set_set_context() argument
689 compiler->options = options; in set_set_context()
690 compiler->scratches = scratches; in set_set_context()
691 compiler->saveds = saveds; in set_set_context()
692 compiler->fscratches = fscratches; in set_set_context()
693 compiler->fsaveds = fsaveds; in set_set_context()
695 compiler->last_return = args & SLJIT_ARG_MASK; in set_set_context()
696 compiler->logical_local_size = local_size; in set_set_context()
700 static SLJIT_INLINE void set_label(struct sljit_label *label, struct sljit_compiler *compiler) in set_label() argument
703 label->size = compiler->size; in set_label()
704 if (compiler->last_label) in set_label()
705 compiler->last_label->next = label; in set_label()
707 compiler->labels = label; in set_label()
708 compiler->last_label = label; in set_label()
711 static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, sljit_u… in set_jump() argument
715 if (compiler->last_jump) in set_jump()
716 compiler->last_jump->next = jump; in set_jump()
718 compiler->jumps = jump; in set_jump()
719 compiler->last_jump = jump; in set_jump()
722 static SLJIT_INLINE void set_const(struct sljit_const *const_, struct sljit_compiler *compiler) in set_const() argument
725 const_->addr = compiler->size; in set_const()
726 if (compiler->last_const) in set_const()
727 compiler->last_const->next = const_; in set_const()
729 compiler->consts = const_; in set_const()
730 compiler->last_const = const_; in set_const()
733 … set_put_label(struct sljit_put_label *put_label, struct sljit_compiler *compiler, sljit_uw offset) in set_put_label() argument
737 put_label->addr = compiler->size - offset; in set_put_label()
739 if (compiler->last_put_label) in set_put_label()
740 compiler->last_put_label->next = put_label; in set_put_label()
742 compiler->put_labels = put_label; in set_put_label()
743 compiler->last_put_label = put_label; in set_put_label()
804 (((r) >= SLJIT_R0 && (r) < (SLJIT_R0 + compiler->scratches)) \
805 || ((r) > (SLJIT_S0 - compiler->saveds) && (r) <= SLJIT_S0))
808 (((fr) >= SLJIT_FR0 && (fr) < (SLJIT_FR0 + compiler->fscratches)) \
809 || ((fr) > (SLJIT_FS0 - compiler->fsaveds) && (fr) <= SLJIT_FS0))
817 static sljit_s32 function_check_src_mem(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in function_check_src_mem() argument
819 if (compiler->scratches == -1 || compiler->saveds == -1) in function_check_src_mem()
826 return (i >= 0 && i < compiler->logical_local_size); in function_check_src_mem()
852 CHECK_ARGUMENT(function_check_src_mem(compiler, p, i));
854 static sljit_s32 function_check_src(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in function_check_src() argument
856 if (compiler->scratches == -1 || compiler->saveds == -1) in function_check_src()
865 return function_check_src_mem(compiler, p, i); in function_check_src()
869 CHECK_ARGUMENT(function_check_src(compiler, p, i));
871 static sljit_s32 function_check_dst(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in function_check_dst() argument
873 if (compiler->scratches == -1 || compiler->saveds == -1) in function_check_dst()
879 return function_check_src_mem(compiler, p, i); in function_check_dst()
883 CHECK_ARGUMENT(function_check_dst(compiler, p, i));
885 static sljit_s32 function_fcheck(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in function_fcheck() argument
887 if (compiler->scratches == -1 || compiler->saveds == -1) in function_fcheck()
893 return function_check_src_mem(compiler, p, i); in function_fcheck()
897 CHECK_ARGUMENT(function_fcheck(compiler, p, i));
903 SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) in sljit_compiler_verbose() argument
905 compiler->verbose = verbose; in sljit_compiler_verbose()
922 static void sljit_verbose_reg(struct sljit_compiler *compiler, sljit_s32 r) in sljit_verbose_reg() argument
924 if (r < (SLJIT_R0 + compiler->scratches)) in sljit_verbose_reg()
925 fprintf(compiler->verbose, "r%d", r - SLJIT_R0); in sljit_verbose_reg()
927 fprintf(compiler->verbose, "s%d", SLJIT_NUMBER_OF_REGISTERS - r); in sljit_verbose_reg()
929 fprintf(compiler->verbose, "sp"); in sljit_verbose_reg()
932 static void sljit_verbose_freg(struct sljit_compiler *compiler, sljit_s32 r) in sljit_verbose_freg() argument
934 if (r < (SLJIT_FR0 + compiler->fscratches)) in sljit_verbose_freg()
935 fprintf(compiler->verbose, "fr%d", r - SLJIT_FR0); in sljit_verbose_freg()
937 fprintf(compiler->verbose, "fs%d", SLJIT_NUMBER_OF_FLOAT_REGISTERS - r); in sljit_verbose_freg()
940 static void sljit_verbose_param(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in sljit_verbose_param() argument
943 fprintf(compiler->verbose, "#%" SLJIT_PRINT_D "d", (i)); in sljit_verbose_param()
946 fputc('[', compiler->verbose); in sljit_verbose_param()
947 sljit_verbose_reg(compiler, (p) & REG_MASK); in sljit_verbose_param()
949 fprintf(compiler->verbose, " + "); in sljit_verbose_param()
950 sljit_verbose_reg(compiler, OFFS_REG(p)); in sljit_verbose_param()
952 fprintf(compiler->verbose, " * %d", 1 << (i)); in sljit_verbose_param()
955 fprintf(compiler->verbose, " + %" SLJIT_PRINT_D "d", (i)); in sljit_verbose_param()
956 fputc(']', compiler->verbose); in sljit_verbose_param()
959 fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); in sljit_verbose_param()
961 sljit_verbose_reg(compiler, p); in sljit_verbose_param()
964 static void sljit_verbose_fparam(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in sljit_verbose_fparam() argument
968 fputc('[', compiler->verbose); in sljit_verbose_fparam()
969 sljit_verbose_reg(compiler, (p) & REG_MASK); in sljit_verbose_fparam()
971 fprintf(compiler->verbose, " + "); in sljit_verbose_fparam()
972 sljit_verbose_reg(compiler, OFFS_REG(p)); in sljit_verbose_fparam()
974 fprintf(compiler->verbose, "%d", 1 << (i)); in sljit_verbose_fparam()
977 fprintf(compiler->verbose, " + %" SLJIT_PRINT_D "d", (i)); in sljit_verbose_fparam()
978 fputc(']', compiler->verbose); in sljit_verbose_fparam()
981 fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); in sljit_verbose_fparam()
984 sljit_verbose_freg(compiler, p); in sljit_verbose_fparam()
1057 #define SLJIT_SKIP_CHECKS(compiler) (compiler)->skip_checks = 1 argument
1059 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_generate_code(struct sljit_compiler *compiler) in check_sljit_generate_code() argument
1065 SLJIT_UNUSED_ARG(compiler); in check_sljit_generate_code()
1068 CHECK_ARGUMENT(compiler->size > 0); in check_sljit_generate_code()
1069 jump = compiler->jumps; in check_sljit_generate_code()
1079 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_enter(struct sljit_compiler *compiler, in check_sljit_emit_enter() argument
1083 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_enter()
1102 compiler->last_flags = 0; in check_sljit_emit_enter()
1105 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_enter()
1106 fprintf(compiler->verbose, " enter ret[%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); in check_sljit_emit_enter()
1110 fprintf(compiler->verbose, "], args["); in check_sljit_emit_enter()
1112 fprintf(compiler->verbose, "%s%s", call_arg_names[arg_types & SLJIT_ARG_MASK], in check_sljit_emit_enter()
1116 fprintf(compiler->verbose, ","); in check_sljit_emit_enter()
1120 fprintf(compiler->verbose, "],"); in check_sljit_emit_enter()
1123 fprintf(compiler->verbose, " enter:reg_arg,"); in check_sljit_emit_enter()
1126 fprintf(compiler->verbose, " keep:%d,", SLJIT_KEPT_SAVEDS_COUNT(options)); in check_sljit_emit_enter()
1129 fprintf(compiler->verbose, "scratches:%d, saveds:%d, fscratches:%d, fsaveds:%d, local_size:%d\n", in check_sljit_emit_enter()
1136 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_set_context(struct sljit_compiler *compiler, in check_sljit_set_context() argument
1140 SLJIT_UNUSED_ARG(compiler); in check_sljit_set_context()
1159 compiler->last_flags = 0; in check_sljit_set_context()
1162 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_set_context()
1163 fprintf(compiler->verbose, " set_context ret[%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); in check_sljit_set_context()
1167 fprintf(compiler->verbose, "], args["); in check_sljit_set_context()
1169 fprintf(compiler->verbose, "%s%s", call_arg_names[arg_types & SLJIT_ARG_MASK], in check_sljit_set_context()
1173 fprintf(compiler->verbose, ","); in check_sljit_set_context()
1177 fprintf(compiler->verbose, "],"); in check_sljit_set_context()
1180 fprintf(compiler->verbose, " enter:reg_arg,"); in check_sljit_set_context()
1183 fprintf(compiler->verbose, " keep:%d,", SLJIT_KEPT_SAVEDS_COUNT(options)); in check_sljit_set_context()
1186 fprintf(compiler->verbose, " scratches:%d, saveds:%d, fscratches:%d, fsaveds:%d, local_size:%d\n", in check_sljit_set_context()
1193 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return_void(struct sljit_compiler *compiler) in check_sljit_emit_return_void() argument
1195 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_return_void()
1196 compiler->skip_checks = 0; in check_sljit_emit_return_void()
1201 CHECK_ARGUMENT(compiler->last_return == SLJIT_ARG_TYPE_VOID); in check_sljit_emit_return_void()
1205 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_return_void()
1206 fprintf(compiler->verbose, " return_void\n"); in check_sljit_emit_return_void()
1212 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return(struct sljit_compiler *compiler, slji… in check_sljit_emit_return() argument
1215 CHECK_ARGUMENT(compiler->scratches >= 0); in check_sljit_emit_return()
1217 switch (compiler->last_return) { in check_sljit_emit_return()
1246 compiler->last_flags = 0; in check_sljit_emit_return()
1249 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_return()
1251 fprintf(compiler->verbose, " return%s%s ", !(op & SLJIT_32) ? "" : "32", in check_sljit_emit_return()
1253 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_return()
1255 fprintf(compiler->verbose, " return%s ", !(op & SLJIT_32) ? ".f64" : ".f32"); in check_sljit_emit_return()
1256 sljit_verbose_fparam(compiler, src, srcw); in check_sljit_emit_return()
1258 fprintf(compiler->verbose, "\n"); in check_sljit_emit_return()
1264 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return_to(struct sljit_compiler *compiler, in check_sljit_emit_return_to() argument
1271 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_return_to()
1272 fprintf(compiler->verbose, " return_to "); in check_sljit_emit_return_to()
1273 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_return_to()
1274 fprintf(compiler->verbose, "\n"); in check_sljit_emit_return_to()
1280 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fast_enter(struct sljit_compiler *compiler, … in check_sljit_emit_fast_enter() argument
1284 compiler->last_flags = 0; in check_sljit_emit_fast_enter()
1287 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fast_enter()
1288 fprintf(compiler->verbose, " fast_enter "); in check_sljit_emit_fast_enter()
1289 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_fast_enter()
1290 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fast_enter()
1296 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op0(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_op0() argument
1302 …CHECK_ARGUMENT(GET_OPCODE(op) < SLJIT_LMUL_UW || GET_OPCODE(op) >= SLJIT_ENDBR || compiler->scratc… in check_sljit_emit_op0()
1304 compiler->last_flags = 0; in check_sljit_emit_op0()
1307 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_emit_op0()
1309 fprintf(compiler->verbose, " %s", op0_names[GET_OPCODE(op) - SLJIT_OP0_BASE]); in check_sljit_emit_op0()
1311 fprintf(compiler->verbose, (op & SLJIT_32) ? "32" : "w"); in check_sljit_emit_op0()
1313 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op0()
1319 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op1(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_op1() argument
1323 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_op1()
1324 compiler->skip_checks = 0; in check_sljit_emit_op1()
1353 compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_32 | SLJIT_SET_Z)); in check_sljit_emit_op1()
1357 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op1()
1360 fprintf(compiler->verbose, " mov%s%s ", !(op & SLJIT_32) ? "" : "32", in check_sljit_emit_op1()
1365 …fprintf(compiler->verbose, " %s%s%s%s%s ", op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE], !(op & SLJ… in check_sljit_emit_op1()
1370 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_op1()
1371 fprintf(compiler->verbose, ", "); in check_sljit_emit_op1()
1372 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_op1()
1373 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op1()
1379 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op2(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_op2() argument
1384 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_op2()
1385 compiler->skip_checks = 0; in check_sljit_emit_op2()
1423 CHECK_ARGUMENT((compiler->last_flags & 0xff) == GET_FLAG_TYPE(SLJIT_SET_CARRY)); in check_sljit_emit_op2()
1424 CHECK_ARGUMENT((op & SLJIT_32) == (compiler->last_flags & SLJIT_32)); in check_sljit_emit_op2()
1442 compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_32 | SLJIT_SET_Z)); in check_sljit_emit_op2()
1445 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op2()
1446 …fprintf(compiler->verbose, " %s%s%s%s%s ", op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], !(op & SLJ… in check_sljit_emit_op2()
1450 fprintf(compiler->verbose, "unset"); in check_sljit_emit_op2()
1452 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_op2()
1453 fprintf(compiler->verbose, ", "); in check_sljit_emit_op2()
1454 sljit_verbose_param(compiler, src1, src1w); in check_sljit_emit_op2()
1455 fprintf(compiler->verbose, ", "); in check_sljit_emit_op2()
1456 sljit_verbose_param(compiler, src2, src2w); in check_sljit_emit_op2()
1457 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op2()
1463 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_shift_into(struct sljit_compiler *compiler, … in check_sljit_emit_shift_into() argument
1477 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_shift_into()
1478 …fprintf(compiler->verbose, " %s%s.into%s ", op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], !(op & SL… in check_sljit_emit_shift_into()
1481 sljit_verbose_reg(compiler, src_dst); in check_sljit_emit_shift_into()
1482 fprintf(compiler->verbose, ", "); in check_sljit_emit_shift_into()
1483 sljit_verbose_param(compiler, src1, src1w); in check_sljit_emit_shift_into()
1484 fprintf(compiler->verbose, ", "); in check_sljit_emit_shift_into()
1485 sljit_verbose_param(compiler, src2, src2w); in check_sljit_emit_shift_into()
1486 fprintf(compiler->verbose, "\n"); in check_sljit_emit_shift_into()
1492 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_src(struct sljit_compiler *compiler, slji… in check_sljit_emit_op_src() argument
1502 compiler->last_flags = 0; in check_sljit_emit_op_src()
1510 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op_src()
1511 fprintf(compiler->verbose, " %s ", op_src_names[op - SLJIT_OP_SRC_BASE]); in check_sljit_emit_op_src()
1512 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_op_src()
1513 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op_src()
1537 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_custom(struct sljit_compiler *compiler, in check_sljit_emit_op_custom() argument
1544 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_op_custom()
1560 compiler->last_flags = 0; in check_sljit_emit_op_custom()
1563 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op_custom()
1564 fprintf(compiler->verbose, " op_custom"); in check_sljit_emit_op_custom()
1566 fprintf(compiler->verbose, " 0x%x", ((sljit_u8*)instruction)[i]); in check_sljit_emit_op_custom()
1567 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op_custom()
1573 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_fop1() argument
1577 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1()
1578 compiler->skip_checks = 0; in check_sljit_emit_fop1()
1590 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1()
1592 fprintf(compiler->verbose, " %s%s ", fop1_names[SLJIT_CONV_F64_FROM_F32 - SLJIT_FOP1_BASE], in check_sljit_emit_fop1()
1595 fprintf(compiler->verbose, " %s%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1()
1598 sljit_verbose_fparam(compiler, dst, dstw); in check_sljit_emit_fop1()
1599 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1()
1600 sljit_verbose_fparam(compiler, src, srcw); in check_sljit_emit_fop1()
1601 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1()
1607 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sl… in check_sljit_emit_fop1_cmp() argument
1612 compiler->last_flags = GET_FLAG_TYPE(op) | (op & SLJIT_32); in check_sljit_emit_fop1_cmp()
1615 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1_cmp()
1616 compiler->skip_checks = 0; in check_sljit_emit_fop1_cmp()
1630 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1_cmp()
1631 …fprintf(compiler->verbose, " %s%s", fop1_names[SLJIT_CMP_F64 - SLJIT_FOP1_BASE], (op & SLJIT_32) … in check_sljit_emit_fop1_cmp()
1633 fprintf(compiler->verbose, ".%s", jump_names[GET_FLAG_TYPE(op)]); in check_sljit_emit_fop1_cmp()
1635 fprintf(compiler->verbose, " "); in check_sljit_emit_fop1_cmp()
1636 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fop1_cmp()
1637 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1_cmp()
1638 sljit_verbose_fparam(compiler, src2, src2w); in check_sljit_emit_fop1_cmp()
1639 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1_cmp()
1645 …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
1649 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1_conv_sw_from_f64()
1650 compiler->skip_checks = 0; in check_sljit_emit_fop1_conv_sw_from_f64()
1662 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1_conv_sw_from_f64()
1663 fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1_conv_sw_from_f64()
1666 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_fop1_conv_sw_from_f64()
1667 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1_conv_sw_from_f64()
1668 sljit_verbose_fparam(compiler, src, srcw); in check_sljit_emit_fop1_conv_sw_from_f64()
1669 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1_conv_sw_from_f64()
1675 …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
1679 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1_conv_f64_from_sw()
1680 compiler->skip_checks = 0; in check_sljit_emit_fop1_conv_f64_from_sw()
1692 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1_conv_f64_from_sw()
1693 fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1_conv_f64_from_sw()
1696 sljit_verbose_fparam(compiler, dst, dstw); in check_sljit_emit_fop1_conv_f64_from_sw()
1697 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1_conv_f64_from_sw()
1698 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_fop1_conv_f64_from_sw()
1699 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1_conv_f64_from_sw()
1705 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop2(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_fop2() argument
1719 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop2()
1720 …fprintf(compiler->verbose, " %s%s ", fop2_names[GET_OPCODE(op) - SLJIT_FOP2_BASE], (op & SLJIT_32… in check_sljit_emit_fop2()
1721 sljit_verbose_fparam(compiler, dst, dstw); in check_sljit_emit_fop2()
1722 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop2()
1723 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fop2()
1724 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop2()
1725 sljit_verbose_fparam(compiler, src2, src2w); in check_sljit_emit_fop2()
1726 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop2()
1732 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_label(struct sljit_compiler *compiler) in check_sljit_emit_label() argument
1734 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_label()
1736 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_label()
1737 compiler->skip_checks = 0; in check_sljit_emit_label()
1742 compiler->last_flags = 0; in check_sljit_emit_label()
1746 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_emit_label()
1747 fprintf(compiler->verbose, "label:\n"); in check_sljit_emit_label()
1763 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_jump() argument
1765 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_jump()
1766 compiler->skip_checks = 0; in check_sljit_emit_jump()
1776 CHECK_ARGUMENT(compiler->last_flags & SLJIT_SET_Z); in check_sljit_emit_jump()
1777 else if ((compiler->last_flags & 0xff) == SLJIT_CARRY) { in check_sljit_emit_jump()
1779 compiler->last_flags = 0; in check_sljit_emit_jump()
1781 CHECK_ARGUMENT((type & 0xff) == (compiler->last_flags & 0xff) in check_sljit_emit_jump()
1782 || ((type & 0xff) == SLJIT_NOT_OVERFLOW && (compiler->last_flags & 0xff) == SLJIT_OVERFLOW) in check_sljit_emit_jump()
1783 || CHECK_UNORDERED(type, compiler->last_flags)); in check_sljit_emit_jump()
1787 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_emit_jump()
1788 fprintf(compiler->verbose, " jump%s %s\n", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", in check_sljit_emit_jump()
1794 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_call(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_call() argument
1800 CHECK_ARGUMENT(function_check_arguments(arg_types, compiler->scratches, -1, compiler->fscratches)); in check_sljit_emit_call()
1803 CHECK_ARGUMENT((arg_types & SLJIT_ARG_MASK) == compiler->last_return); in check_sljit_emit_call()
1805 if (compiler->options & SLJIT_ENTER_REG_ARG) { in check_sljit_emit_call()
1813 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_call()
1814 fprintf(compiler->verbose, " %s%s%s ret[%s", jump_names[type & 0xff], in check_sljit_emit_call()
1821 fprintf(compiler->verbose, "], args["); in check_sljit_emit_call()
1823 fprintf(compiler->verbose, "%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); in check_sljit_emit_call()
1826 fprintf(compiler->verbose, ","); in check_sljit_emit_call()
1829 fprintf(compiler->verbose, "]\n"); in check_sljit_emit_call()
1835 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_cmp() argument
1844 compiler->last_flags = 0; in check_sljit_emit_cmp()
1847 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_cmp()
1848 fprintf(compiler->verbose, " cmp%s%s %s, ", (type & SLJIT_32) ? "32" : "", in check_sljit_emit_cmp()
1850 sljit_verbose_param(compiler, src1, src1w); in check_sljit_emit_cmp()
1851 fprintf(compiler->verbose, ", "); in check_sljit_emit_cmp()
1852 sljit_verbose_param(compiler, src2, src2w); in check_sljit_emit_cmp()
1853 fprintf(compiler->verbose, "\n"); in check_sljit_emit_cmp()
1859 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_fcmp() argument
1870 compiler->last_flags = 0; in check_sljit_emit_fcmp()
1873 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fcmp()
1874 fprintf(compiler->verbose, " fcmp%s%s %s, ", (type & SLJIT_32) ? ".f32" : ".f64", in check_sljit_emit_fcmp()
1876 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fcmp()
1877 fprintf(compiler->verbose, ", "); in check_sljit_emit_fcmp()
1878 sljit_verbose_fparam(compiler, src2, src2w); in check_sljit_emit_fcmp()
1879 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fcmp()
1885 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_ijump(struct sljit_compiler *compiler, sljit… in check_sljit_emit_ijump() argument
1888 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_ijump()
1889 compiler->skip_checks = 0; in check_sljit_emit_ijump()
1898 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_ijump()
1899 fprintf(compiler->verbose, " ijump.%s ", jump_names[type]); in check_sljit_emit_ijump()
1900 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_ijump()
1901 fprintf(compiler->verbose, "\n"); in check_sljit_emit_ijump()
1907 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_icall(struct sljit_compiler *compiler, sljit… in check_sljit_emit_icall() argument
1914 CHECK_ARGUMENT(function_check_arguments(arg_types, compiler->scratches, -1, compiler->fscratches)); in check_sljit_emit_icall()
1918 CHECK_ARGUMENT((arg_types & SLJIT_ARG_MASK) == compiler->last_return); in check_sljit_emit_icall()
1920 if (compiler->options & SLJIT_ENTER_REG_ARG) { in check_sljit_emit_icall()
1928 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_icall()
1929 fprintf(compiler->verbose, " i%s%s ret[%s", jump_names[type & 0xff], in check_sljit_emit_icall()
1935 fprintf(compiler->verbose, "], args["); in check_sljit_emit_icall()
1937 fprintf(compiler->verbose, "%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); in check_sljit_emit_icall()
1940 fprintf(compiler->verbose, ","); in check_sljit_emit_icall()
1943 fprintf(compiler->verbose, "], "); in check_sljit_emit_icall()
1944 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_icall()
1945 fprintf(compiler->verbose, "\n"); in check_sljit_emit_icall()
1951 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_flags(struct sljit_compiler *compiler, sl… in check_sljit_emit_op_flags() argument
1962 CHECK_ARGUMENT(compiler->last_flags & SLJIT_SET_Z); in check_sljit_emit_op_flags()
1964 CHECK_ARGUMENT(type == (compiler->last_flags & 0xff) in check_sljit_emit_op_flags()
1965 || (type == SLJIT_NOT_CARRY && (compiler->last_flags & 0xff) == SLJIT_CARRY) in check_sljit_emit_op_flags()
1966 || (type == SLJIT_NOT_OVERFLOW && (compiler->last_flags & 0xff) == SLJIT_OVERFLOW) in check_sljit_emit_op_flags()
1967 || CHECK_UNORDERED(type, compiler->last_flags)); in check_sljit_emit_op_flags()
1972 compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_32 | SLJIT_SET_Z)); in check_sljit_emit_op_flags()
1975 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op_flags()
1976 fprintf(compiler->verbose, " flags.%s%s%s ", in check_sljit_emit_op_flags()
1980 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_op_flags()
1981 fprintf(compiler->verbose, ", %s\n", jump_names[type]); in check_sljit_emit_op_flags()
1987 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_cmov(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_cmov() argument
1996 CHECK_ARGUMENT(compiler->scratches != -1 && compiler->saveds != -1); in check_sljit_emit_cmov()
2004 CHECK_ARGUMENT(compiler->last_flags & SLJIT_SET_Z); in check_sljit_emit_cmov()
2006 CHECK_ARGUMENT(cond == (compiler->last_flags & 0xff) in check_sljit_emit_cmov()
2007 || (cond == SLJIT_NOT_CARRY && (compiler->last_flags & 0xff) == SLJIT_CARRY) in check_sljit_emit_cmov()
2008 || (cond == SLJIT_NOT_OVERFLOW && (compiler->last_flags & 0xff) == SLJIT_OVERFLOW) in check_sljit_emit_cmov()
2009 || CHECK_UNORDERED(cond, compiler->last_flags)); in check_sljit_emit_cmov()
2012 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_cmov()
2013 fprintf(compiler->verbose, " cmov%s %s, ", in check_sljit_emit_cmov()
2016 sljit_verbose_reg(compiler, dst_reg); in check_sljit_emit_cmov()
2017 fprintf(compiler->verbose, ", "); in check_sljit_emit_cmov()
2018 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_cmov()
2019 fprintf(compiler->verbose, "\n"); in check_sljit_emit_cmov()
2025 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_mem(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_mem() argument
2029 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_mem()
2030 compiler->skip_checks = 0; in check_sljit_emit_mem()
2075 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_mem()
2077 fprintf(compiler->verbose, " %s32", in check_sljit_emit_mem()
2080 fprintf(compiler->verbose, " %s%s%s", in check_sljit_emit_mem()
2093 fprintf(compiler->verbose, " {"); in check_sljit_emit_mem()
2094 sljit_verbose_reg(compiler, REG_PAIR_FIRST(reg)); in check_sljit_emit_mem()
2095 fprintf(compiler->verbose, ", "); in check_sljit_emit_mem()
2096 sljit_verbose_reg(compiler, REG_PAIR_SECOND(reg)); in check_sljit_emit_mem()
2097 fprintf(compiler->verbose, "}, "); in check_sljit_emit_mem()
2099 fprintf(compiler->verbose, " "); in check_sljit_emit_mem()
2100 sljit_verbose_reg(compiler, reg); in check_sljit_emit_mem()
2101 fprintf(compiler->verbose, ", "); in check_sljit_emit_mem()
2103 sljit_verbose_param(compiler, mem, memw); in check_sljit_emit_mem()
2104 fprintf(compiler->verbose, "\n"); in check_sljit_emit_mem()
2110 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_mem_update(struct sljit_compiler *compiler, … in check_sljit_emit_mem_update() argument
2114 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_mem_update()
2115 compiler->skip_checks = 0; in check_sljit_emit_mem_update()
2127 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_mem_update()
2130 …if (sljit_emit_mem_update(compiler, type | SLJIT_MEM_SUPP, reg, mem, memw) == SLJIT_ERR_UNSUPPORTE… in check_sljit_emit_mem_update()
2131 fprintf(compiler->verbose, " # mem: unsupported form, no instructions are emitted\n"); in check_sljit_emit_mem_update()
2136 fprintf(compiler->verbose, " %s32.%s ", in check_sljit_emit_mem_update()
2140 fprintf(compiler->verbose, " %s%s%s.%s ", in check_sljit_emit_mem_update()
2146 sljit_verbose_reg(compiler, reg); in check_sljit_emit_mem_update()
2147 fprintf(compiler->verbose, ", "); in check_sljit_emit_mem_update()
2148 sljit_verbose_param(compiler, mem, memw); in check_sljit_emit_mem_update()
2149 fprintf(compiler->verbose, "\n"); in check_sljit_emit_mem_update()
2155 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fmem(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_fmem() argument
2176 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fmem()
2177 fprintf(compiler->verbose, " %s.%s", in check_sljit_emit_fmem()
2188 fprintf(compiler->verbose, " "); in check_sljit_emit_fmem()
2189 sljit_verbose_freg(compiler, freg); in check_sljit_emit_fmem()
2190 fprintf(compiler->verbose, ", "); in check_sljit_emit_fmem()
2191 sljit_verbose_param(compiler, mem, memw); in check_sljit_emit_fmem()
2192 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fmem()
2198 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fmem_update(struct sljit_compiler *compiler,… in check_sljit_emit_fmem_update() argument
2209 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fmem_update()
2212 …if (sljit_emit_fmem_update(compiler, type | SLJIT_MEM_SUPP, freg, mem, memw) == SLJIT_ERR_UNSUPPOR… in check_sljit_emit_fmem_update()
2213 fprintf(compiler->verbose, " # fmem: unsupported form, no instructions are emitted\n"); in check_sljit_emit_fmem_update()
2217 fprintf(compiler->verbose, " %s.%s.%s ", in check_sljit_emit_fmem_update()
2222 sljit_verbose_freg(compiler, freg); in check_sljit_emit_fmem_update()
2223 fprintf(compiler->verbose, ", "); in check_sljit_emit_fmem_update()
2224 sljit_verbose_param(compiler, mem, memw); in check_sljit_emit_fmem_update()
2225 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fmem_update()
2232 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_get_local_base(struct sljit_compiler *compiler, s… in check_sljit_get_local_base() argument
2241 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_get_local_base()
2242 fprintf(compiler->verbose, " local_base "); in check_sljit_get_local_base()
2243 sljit_verbose_param(compiler, dst, dstw); in check_sljit_get_local_base()
2244 fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", offset); in check_sljit_get_local_base()
2250 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_const(struct sljit_compiler *compiler, sljit… in check_sljit_emit_const() argument
2258 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_const()
2259 fprintf(compiler->verbose, " const "); in check_sljit_emit_const()
2260 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_const()
2261 fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", init_value); in check_sljit_emit_const()
2267 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_put_label(struct sljit_compiler *compiler, s… in check_sljit_emit_put_label() argument
2273 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_put_label()
2274 fprintf(compiler->verbose, " put_label "); in check_sljit_emit_put_label()
2275 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_put_label()
2276 fprintf(compiler->verbose, "\n"); in check_sljit_emit_put_label()
2284 #define SLJIT_SKIP_CHECKS(compiler) argument
2288 #define SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw) \ argument
2293 CHECK(check_sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw)); \
2296 return sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw); \
2299 CHECK(check_sljit_emit_fop1_conv_sw_from_f64(compiler, op, dst, dstw, src, srcw)); \
2302 return sljit_emit_fop1_conv_sw_from_f64(compiler, op, dst, dstw, src, srcw); \
2304 CHECK(check_sljit_emit_fop1_conv_f64_from_sw(compiler, op, dst, dstw, src, srcw)); \
2307 return sljit_emit_fop1_conv_f64_from_sw(compiler, op, dst, dstw, src, srcw); \
2309 CHECK(check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw)); \
2319 static SLJIT_INLINE sljit_s32 sljit_emit_cmov_generic(struct sljit_compiler *compiler, sljit_s32 ty… in sljit_emit_cmov_generic() argument
2327 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_cmov_generic()
2328 jump = sljit_emit_jump(compiler, (type & ~SLJIT_32) ^ 0x1); in sljit_emit_cmov_generic()
2331 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_cmov_generic()
2332 FAIL_IF(sljit_emit_op1(compiler, op, dst_reg, 0, src, srcw)); in sljit_emit_cmov_generic()
2334 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_cmov_generic()
2335 label = sljit_emit_label(compiler); in sljit_emit_cmov_generic()
2347 static sljit_s32 sljit_emit_mem_unaligned(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_mem_unaligned() argument
2351 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_mem_unaligned()
2354 return sljit_emit_op1(compiler, type & (0xff | SLJIT_32), mem, memw, reg, 0); in sljit_emit_mem_unaligned()
2355 return sljit_emit_op1(compiler, type & (0xff | SLJIT_32), reg, 0, mem, memw); in sljit_emit_mem_unaligned()
2363 static sljit_s32 sljit_emit_fmem_unaligned(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_fmem_unaligned() argument
2367 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_fmem_unaligned()
2370 return sljit_emit_fop1(compiler, type & (0xff | SLJIT_32), mem, memw, freg, 0); in sljit_emit_fmem_unaligned()
2371 return sljit_emit_fop1(compiler, type & (0xff | SLJIT_32), freg, 0, mem, memw); in sljit_emit_fmem_unaligned()
2422 static SLJIT_INLINE sljit_s32 emit_mov_before_return(struct sljit_compiler *compiler, sljit_s32 op,… in emit_mov_before_return() argument
2433 SLJIT_SKIP_CHECKS(compiler); in emit_mov_before_return()
2434 return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw); in emit_mov_before_return()
2440 static SLJIT_INLINE sljit_s32 emit_fmov_before_return(struct sljit_compiler *compiler, sljit_s32 op… in emit_fmov_before_return() argument
2445 SLJIT_SKIP_CHECKS(compiler); in emit_fmov_before_return()
2446 return sljit_emit_fop1(compiler, op, SLJIT_RETURN_FREG, 0, src, srcw); in emit_fmov_before_return()
2451 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op,… in sljit_emit_return() argument
2454 CHECK(check_sljit_emit_return(compiler, op, src, srcw)); in sljit_emit_return()
2457 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
2459 FAIL_IF(emit_fmov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
2462 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_return()
2463 return sljit_emit_return_void(compiler); in sljit_emit_return()
2469 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s… in sljit_emit_cmp() argument
2478 CHECK_PTR(check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w)); in sljit_emit_cmp()
2490 return emit_cmp_to0(compiler, type, src1, src1w); in sljit_emit_cmp()
2537 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_cmp()
2538 PTR_FAIL_IF(sljit_emit_op2u(compiler, in sljit_emit_cmp()
2541 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_cmp()
2542 return sljit_emit_jump(compiler, condition | (type & (SLJIT_REWRITABLE_JUMP | SLJIT_32))); in sljit_emit_cmp()
2565 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_… in sljit_emit_fcmp() argument
2570 CHECK_PTR(check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w)); in sljit_emit_fcmp()
2572 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_fcmp()
2573 …sljit_emit_fop1(compiler, SLJIT_CMP_F64 | ((type & 0xff) << VARIABLE_FLAG_SHIFT) | (type & SLJIT_3… in sljit_emit_fcmp()
2575 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_fcmp()
2576 return sljit_emit_jump(compiler, type); in sljit_emit_fcmp()
2582 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem_update(struct sljit_compiler *compiler, sljit_s32… in sljit_emit_mem_update() argument
2587 CHECK(check_sljit_emit_mem_update(compiler, type, reg, mem, memw)); in sljit_emit_mem_update()
2601 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_fmem() argument
2606 CHECK(check_sljit_emit_fmem(compiler, type, freg, mem, memw)); in sljit_emit_fmem()
2608 return sljit_emit_fmem_unaligned(compiler, type, freg, mem, memw); in sljit_emit_fmem()
2616 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem_update(struct sljit_compiler *compiler, sljit_s3… in sljit_emit_fmem_update() argument
2621 CHECK(check_sljit_emit_fmem_update(compiler, type, freg, mem, memw)); in sljit_emit_fmem_update()
2635 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 … in sljit_get_local_base() argument
2638 CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset)); in sljit_get_local_base()
2642 SLJIT_SKIP_CHECKS(compiler); in sljit_get_local_base()
2645 return sljit_emit_op2(compiler, SLJIT_ADD, dst, dstw, SLJIT_SP, 0, SLJIT_IMM, offset); in sljit_get_local_base()
2646 return sljit_emit_op1(compiler, SLJIT_MOV, dst, dstw, SLJIT_SP, 0); in sljit_get_local_base()
2668 SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler) in sljit_free_compiler() argument
2670 SLJIT_UNUSED_ARG(compiler); in sljit_free_compiler()
2674 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_compiler_memory_error(struct sljit_compiler *compiler) in sljit_set_compiler_memory_error() argument
2676 SLJIT_UNUSED_ARG(compiler); in sljit_set_compiler_memory_error()
2680 SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_s32 size) in sljit_alloc_memory() argument
2682 SLJIT_UNUSED_ARG(compiler); in sljit_alloc_memory()
2689 SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) in sljit_compiler_verbose() argument
2691 SLJIT_UNUSED_ARG(compiler); in sljit_compiler_verbose()
2697 SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) in sljit_generate_code() argument
2699 SLJIT_UNUSED_ARG(compiler); in sljit_generate_code()
2725 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler, in sljit_emit_enter() argument
2729 SLJIT_UNUSED_ARG(compiler); in sljit_emit_enter()
2741 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
2745 SLJIT_UNUSED_ARG(compiler); in sljit_set_context()
2757 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_void(struct sljit_compiler *compiler) in sljit_emit_return_void() argument
2759 SLJIT_UNUSED_ARG(compiler); in sljit_emit_return_void()
2764 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op,… in sljit_emit_return() argument
2766 SLJIT_UNUSED_ARG(compiler); in sljit_emit_return()
2774 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return_to(struct sljit_compiler *compiler, sljit_s32 … in sljit_emit_return_to() argument
2776 SLJIT_UNUSED_ARG(compiler); in sljit_emit_return_to()
2783 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32… in sljit_emit_fast_enter() argument
2785 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fast_enter()
2792 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in sljit_emit_op0() argument
2794 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op0()
2800 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op1() argument
2804 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op1()
2814 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2() argument
2819 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op2()
2831 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2u(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2u() argument
2835 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op2u()
2845 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_shift_into(struct sljit_compiler *compiler, sljit_s32… in sljit_emit_shift_into() argument
2850 SLJIT_UNUSED_ARG(compiler); in sljit_emit_shift_into()
2861 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_src() argument
2864 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op_src()
2878 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, in sljit_emit_op_custom() argument
2881 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op_custom()
2888 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_current_flags(struct sljit_compiler *compiler, sljit_s32 cu… in sljit_set_current_flags() argument
2890 SLJIT_UNUSED_ARG(compiler); in sljit_set_current_flags()
2894 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1() argument
2898 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fop1()
2908 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop2() argument
2913 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fop2()
2925 SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) in sljit_emit_label() argument
2927 SLJIT_UNUSED_ARG(compiler); in sljit_emit_label()
2932 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in sljit_emit_jump() argument
2934 SLJIT_UNUSED_ARG(compiler); in sljit_emit_jump()
2940 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compiler *compiler, sljit_… in sljit_emit_call() argument
2943 SLJIT_UNUSED_ARG(compiler); in sljit_emit_call()
2950 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s… in sljit_emit_cmp() argument
2954 SLJIT_UNUSED_ARG(compiler); in sljit_emit_cmp()
2964 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_… in sljit_emit_fcmp() argument
2968 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fcmp()
2999 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type… in sljit_emit_ijump() argument
3001 SLJIT_UNUSED_ARG(compiler); in sljit_emit_ijump()
3009 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_icall() argument
3013 SLJIT_UNUSED_ARG(compiler); in sljit_emit_icall()
3022 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 o… in sljit_emit_op_flags() argument
3026 SLJIT_UNUSED_ARG(compiler); in sljit_emit_op_flags()
3035 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_cmov() argument
3039 SLJIT_UNUSED_ARG(compiler); in sljit_emit_cmov()
3048 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compiler, sljit_s32 type, … in sljit_emit_mem() argument
3050 SLJIT_UNUSED_ARG(compiler); in sljit_emit_mem()
3059 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem_update(struct sljit_compiler *compiler, sljit_s32… in sljit_emit_mem_update() argument
3061 SLJIT_UNUSED_ARG(compiler); in sljit_emit_mem_update()
3070 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem(struct sljit_compiler *compiler, sljit_s32 type,… in sljit_emit_fmem() argument
3072 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fmem()
3081 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem_update(struct sljit_compiler *compiler, sljit_s3… in sljit_emit_fmem_update() argument
3083 SLJIT_UNUSED_ARG(compiler); in sljit_emit_fmem_update()
3092 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 … in sljit_get_local_base() argument
3094 SLJIT_UNUSED_ARG(compiler); in sljit_get_local_base()
3102 SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, slji… in sljit_emit_const() argument
3104 SLJIT_UNUSED_ARG(compiler); in sljit_emit_const()
3112 …UTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, s… in sljit_emit_put_label() argument
3114 SLJIT_UNUSED_ARG(compiler); in sljit_emit_put_label()