Lines Matching full:compiler

2  *    Stack-less Just-In-Time 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; \
395 compiler->error = SLJIT_ERR_BAD_ARGUMENT; \
403 compiler->error = SLJIT_ERR_BAD_ARGUMENT; \
459 …struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(sizeof(struct sljit_compile… in sljit_create_compiler() local
460 if (!compiler) in sljit_create_compiler()
462 SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler)); in sljit_create_compiler()
480 compiler->error = SLJIT_SUCCESS; in sljit_create_compiler()
482 compiler->allocator_data = allocator_data; in sljit_create_compiler()
483 compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE, allocator_data); in sljit_create_compiler()
484 compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE, allocator_data); in sljit_create_compiler()
486 if (!compiler->buf || !compiler->abuf) { in sljit_create_compiler()
487 if (compiler->buf) in sljit_create_compiler()
488 SLJIT_FREE(compiler->buf, allocator_data); in sljit_create_compiler()
489 if (compiler->abuf) in sljit_create_compiler()
490 SLJIT_FREE(compiler->abuf, allocator_data); in sljit_create_compiler()
491 SLJIT_FREE(compiler, allocator_data); in sljit_create_compiler()
495 compiler->buf->next = NULL; in sljit_create_compiler()
496 compiler->buf->used_size = 0; in sljit_create_compiler()
497 compiler->abuf->next = NULL; in sljit_create_compiler()
498 compiler->abuf->used_size = 0; in sljit_create_compiler()
500 compiler->scratches = -1; in sljit_create_compiler()
501 compiler->saveds = -1; in sljit_create_compiler()
502 compiler->fscratches = -1; in sljit_create_compiler()
503 compiler->fsaveds = -1; in sljit_create_compiler()
504 compiler->local_size = -1; in sljit_create_compiler()
507 compiler->args_size = -1; in sljit_create_compiler()
511 compiler->cpool = (sljit_uw*)SLJIT_MALLOC(CPOOL_SIZE * sizeof(sljit_uw) in sljit_create_compiler()
513 if (!compiler->cpool) { in sljit_create_compiler()
514 SLJIT_FREE(compiler->buf, allocator_data); in sljit_create_compiler()
515 SLJIT_FREE(compiler->abuf, allocator_data); in sljit_create_compiler()
516 SLJIT_FREE(compiler, allocator_data); in sljit_create_compiler()
519 compiler->cpool_unique = (sljit_u8*)(compiler->cpool + CPOOL_SIZE); in sljit_create_compiler()
520 compiler->cpool_diff = 0xffffffff; in sljit_create_compiler()
524 compiler->delay_slot = UNMOVABLE_INS; in sljit_create_compiler()
529 compiler->last_flags = 0; in sljit_create_compiler()
530 compiler->last_return = -1; in sljit_create_compiler()
531 compiler->logical_local_size = 0; in sljit_create_compiler()
541 return compiler; in sljit_create_compiler()
544 SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler) in sljit_free_compiler() argument
548 void *allocator_data = compiler->allocator_data; in sljit_free_compiler()
551 buf = compiler->buf; in sljit_free_compiler()
558 buf = compiler->abuf; in sljit_free_compiler()
566 SLJIT_FREE(compiler->cpool, allocator_data); in sljit_free_compiler()
568 SLJIT_FREE(compiler, allocator_data); in sljit_free_compiler()
571 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_compiler_memory_error(struct sljit_compiler *compiler) in sljit_set_compiler_memory_error() argument
573 if (compiler->error == SLJIT_SUCCESS) in sljit_set_compiler_memory_error()
574 compiler->error = SLJIT_ERR_ALLOC_FAILED; in sljit_set_compiler_memory_error()
603 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_current_flags(struct sljit_compiler *compiler, sljit_s32 cu… in sljit_set_current_flags() argument
605 SLJIT_UNUSED_ARG(compiler); in sljit_set_current_flags()
609 compiler->status_flags_state = current_flags; in sljit_set_current_flags()
613 compiler->last_flags = 0; in sljit_set_current_flags()
615 compiler->last_flags = GET_FLAG_TYPE(current_flags) | (current_flags & (SLJIT_32 | SLJIT_SET_Z)); in sljit_set_current_flags()
624 static void* ensure_buf(struct sljit_compiler *compiler, sljit_uw size) in ensure_buf() argument
630 …if (compiler->buf->used_size + size <= (BUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fr… in ensure_buf()
631 ret = compiler->buf->memory + compiler->buf->used_size; in ensure_buf()
632 compiler->buf->used_size += size; in ensure_buf()
635 new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE, compiler->allocator_data); in ensure_buf()
637 new_frag->next = compiler->buf; in ensure_buf()
638 compiler->buf = new_frag; in ensure_buf()
643 static void* ensure_abuf(struct sljit_compiler *compiler, sljit_uw size) in ensure_abuf() argument
649 …if (compiler->abuf->used_size + size <= (ABUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_… in ensure_abuf()
650 ret = compiler->abuf->memory + compiler->abuf->used_size; in ensure_abuf()
651 compiler->abuf->used_size += size; in ensure_abuf()
654 new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE, compiler->allocator_data); in ensure_abuf()
656 new_frag->next = compiler->abuf; in ensure_abuf()
657 compiler->abuf = new_frag; in ensure_abuf()
662 SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_s32 size) in sljit_alloc_memory() argument
675 return ensure_abuf(compiler, (sljit_uw)size); in sljit_alloc_memory()
678 static SLJIT_INLINE void reverse_buf(struct sljit_compiler *compiler) in reverse_buf() argument
680 struct sljit_memory_fragment *buf = compiler->buf; in reverse_buf()
691 compiler->buf = prev; in reverse_buf()
755 static SLJIT_INLINE void set_emit_enter(struct sljit_compiler *compiler, in set_emit_enter() argument
762 compiler->options = options; in set_emit_enter()
763 compiler->scratches = scratches; in set_emit_enter()
764 compiler->saveds = saveds; in set_emit_enter()
765 compiler->fscratches = fscratches; in set_emit_enter()
766 compiler->fsaveds = fsaveds; in set_emit_enter()
768 compiler->last_return = args & SLJIT_ARG_MASK; in set_emit_enter()
769 compiler->logical_local_size = local_size; in set_emit_enter()
773 static SLJIT_INLINE void set_set_context(struct sljit_compiler *compiler, in set_set_context() argument
780 compiler->options = options; in set_set_context()
781 compiler->scratches = scratches; in set_set_context()
782 compiler->saveds = saveds; in set_set_context()
783 compiler->fscratches = fscratches; in set_set_context()
784 compiler->fsaveds = fsaveds; in set_set_context()
786 compiler->last_return = args & SLJIT_ARG_MASK; in set_set_context()
787 compiler->logical_local_size = local_size; in set_set_context()
791 static SLJIT_INLINE void set_label(struct sljit_label *label, struct sljit_compiler *compiler) in set_label() argument
794 label->u.index = compiler->label_count++; in set_label()
795 label->size = compiler->size; in set_label()
796 if (compiler->last_label != NULL) in set_label()
797 compiler->last_label->next = label; in set_label()
799 compiler->labels = label; in set_label()
800 compiler->last_label = label; in set_label()
803 static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, sljit_u… in set_jump() argument
808 if (compiler->last_jump != NULL) in set_jump()
809 compiler->last_jump->next = jump; in set_jump()
811 compiler->jumps = jump; in set_jump()
812 compiler->last_jump = jump; in set_jump()
815 static SLJIT_INLINE void set_mov_addr(struct sljit_jump *jump, struct sljit_compiler *compiler, slj… in set_mov_addr() argument
818 jump->addr = compiler->size - offset; in set_mov_addr()
821 if (compiler->last_jump != NULL) in set_mov_addr()
822 compiler->last_jump->next = jump; in set_mov_addr()
824 compiler->jumps = jump; in set_mov_addr()
825 compiler->last_jump = jump; in set_mov_addr()
828 static SLJIT_INLINE void set_const(struct sljit_const *const_, struct sljit_compiler *compiler) in set_const() argument
831 const_->addr = compiler->size; in set_const()
832 if (compiler->last_const != NULL) in set_const()
833 compiler->last_const->next = const_; in set_const()
835 compiler->consts = const_; in set_const()
836 compiler->last_const = const_; in set_const()
897 (((r) >= SLJIT_R0 && (r) < (SLJIT_R0 + compiler->scratches)) \
898 || ((r) > (SLJIT_S0 - compiler->saveds) && (r) <= SLJIT_S0) \
907 static sljit_s32 function_check_src_mem(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in function_check_src_mem() argument
909 if (compiler->scratches == -1) in function_check_src_mem()
916 return (i >= 0 && i < compiler->logical_local_size); in function_check_src_mem()
942 CHECK_ARGUMENT(function_check_src_mem(compiler, p, i));
944 static sljit_s32 function_check_src(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in function_check_src() argument
946 if (compiler->scratches == -1) in function_check_src()
955 return function_check_src_mem(compiler, p, i); in function_check_src()
959 CHECK_ARGUMENT(function_check_src(compiler, p, i));
961 static sljit_s32 function_check_dst(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in function_check_dst() argument
963 if (compiler->scratches == -1) in function_check_dst()
969 return function_check_src_mem(compiler, p, i); in function_check_dst()
973 CHECK_ARGUMENT(function_check_dst(compiler, p, i));
979 function_check_is_freg(compiler, (fr), (is_32))
981 static sljit_s32 function_check_is_freg(struct sljit_compiler *compiler, sljit_s32 fr, sljit_s32 is…
984 CHECK_ARGUMENT(function_fcheck(compiler, (p), (i), (is_32)));
986 static sljit_s32 function_fcheck(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i, sljit_s3… in function_fcheck() argument
988 if (compiler->scratches == -1) in function_fcheck()
994 return function_check_src_mem(compiler, p, i); in function_fcheck()
999 function_check_is_freg(compiler, (fr))
1001 static sljit_s32 function_check_is_freg(struct sljit_compiler *compiler, sljit_s32 fr) in function_check_is_freg() argument
1003 if (compiler->scratches == -1) in function_check_is_freg()
1006 return (fr >= SLJIT_FR0 && fr < (SLJIT_FR0 + compiler->fscratches)) in function_check_is_freg()
1007 || (fr > (SLJIT_FS0 - compiler->fsaveds) && fr <= SLJIT_FS0) in function_check_is_freg()
1012 CHECK_ARGUMENT(function_fcheck(compiler, (p), (i)));
1014 static sljit_s32 function_fcheck(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in function_fcheck() argument
1016 if (compiler->scratches == -1) in function_fcheck()
1019 if ((p >= SLJIT_FR0 && p < (SLJIT_FR0 + compiler->fscratches)) in function_fcheck()
1020 || (p > (SLJIT_FS0 - compiler->fsaveds) && p <= SLJIT_FS0) in function_fcheck()
1024 return function_check_src_mem(compiler, p, i); in function_fcheck()
1033 SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) in sljit_compiler_verbose() argument
1035 compiler->verbose = verbose; in sljit_compiler_verbose()
1052 static void sljit_verbose_reg(struct sljit_compiler *compiler, sljit_s32 r) in sljit_verbose_reg() argument
1054 if (r < (SLJIT_R0 + compiler->scratches)) in sljit_verbose_reg()
1055 fprintf(compiler->verbose, "r%d", r - SLJIT_R0); in sljit_verbose_reg()
1057 fprintf(compiler->verbose, "s%d", SLJIT_NUMBER_OF_REGISTERS - r); in sljit_verbose_reg()
1059 fprintf(compiler->verbose, "sp"); in sljit_verbose_reg()
1061 fprintf(compiler->verbose, "t%d", r - SLJIT_TMP_REGISTER_BASE); in sljit_verbose_reg()
1064 static void sljit_verbose_freg(struct sljit_compiler *compiler, sljit_s32 r) in sljit_verbose_freg() argument
1069 fprintf(compiler->verbose, "^"); in sljit_verbose_freg()
1074 if (r < (SLJIT_FR0 + compiler->fscratches)) in sljit_verbose_freg()
1075 fprintf(compiler->verbose, "fr%d", r - SLJIT_FR0); in sljit_verbose_freg()
1077 fprintf(compiler->verbose, "fs%d", SLJIT_NUMBER_OF_FLOAT_REGISTERS - r); in sljit_verbose_freg()
1079 fprintf(compiler->verbose, "ft%d", r - SLJIT_TMP_FREGISTER_BASE); in sljit_verbose_freg()
1082 static void sljit_verbose_param(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in sljit_verbose_param() argument
1085 fprintf(compiler->verbose, "#%" SLJIT_PRINT_D "d", (i)); in sljit_verbose_param()
1088 fputc('[', compiler->verbose); in sljit_verbose_param()
1089 sljit_verbose_reg(compiler, (p) & REG_MASK); in sljit_verbose_param()
1091 fprintf(compiler->verbose, " + "); in sljit_verbose_param()
1092 sljit_verbose_reg(compiler, OFFS_REG(p)); in sljit_verbose_param()
1094 fprintf(compiler->verbose, " * %d", 1 << (i)); in sljit_verbose_param()
1097 fprintf(compiler->verbose, " + %" SLJIT_PRINT_D "d", (i)); in sljit_verbose_param()
1098 fputc(']', compiler->verbose); in sljit_verbose_param()
1101 fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); in sljit_verbose_param()
1103 sljit_verbose_reg(compiler, p); in sljit_verbose_param()
1106 static void sljit_verbose_fparam(struct sljit_compiler *compiler, sljit_s32 p, sljit_sw i) in sljit_verbose_fparam() argument
1110 fputc('[', compiler->verbose); in sljit_verbose_fparam()
1111 sljit_verbose_reg(compiler, (p) & REG_MASK); in sljit_verbose_fparam()
1113 fprintf(compiler->verbose, " + "); in sljit_verbose_fparam()
1114 sljit_verbose_reg(compiler, OFFS_REG(p)); in sljit_verbose_fparam()
1116 fprintf(compiler->verbose, "%d", 1 << (i)); in sljit_verbose_fparam()
1119 fprintf(compiler->verbose, " + %" SLJIT_PRINT_D "d", (i)); in sljit_verbose_fparam()
1120 fputc(']', compiler->verbose); in sljit_verbose_fparam()
1123 fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); in sljit_verbose_fparam()
1126 sljit_verbose_freg(compiler, p); in sljit_verbose_fparam()
1226 #define SLJIT_SKIP_CHECKS(compiler) (compiler)->skip_checks = 1 argument
1228 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_generate_code(struct sljit_compiler *compiler) in check_sljit_generate_code() argument
1234 SLJIT_UNUSED_ARG(compiler); in check_sljit_generate_code()
1237 CHECK_ARGUMENT(compiler->size > 0); in check_sljit_generate_code()
1238 jump = compiler->jumps; in check_sljit_generate_code()
1254 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_enter(struct sljit_compiler *compiler, in check_sljit_emit_enter() argument
1258 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_enter()
1277 compiler->last_flags = 0; in check_sljit_emit_enter()
1280 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_enter()
1281 fprintf(compiler->verbose, " enter ret[%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); in check_sljit_emit_enter()
1285 fprintf(compiler->verbose, "], args["); in check_sljit_emit_enter()
1287 fprintf(compiler->verbose, "%s%s", call_arg_names[arg_types & SLJIT_ARG_MASK], in check_sljit_emit_enter()
1291 fprintf(compiler->verbose, ","); in check_sljit_emit_enter()
1295 fprintf(compiler->verbose, "],"); in check_sljit_emit_enter()
1299 fprintf(compiler->verbose, " opt:reg_arg(%d),", SLJIT_KEPT_SAVEDS_COUNT(options)); in check_sljit_emit_enter()
1301 fprintf(compiler->verbose, " opt:reg_arg,"); in check_sljit_emit_enter()
1306 fprintf(compiler->verbose, " opt:use_vex,"); in check_sljit_emit_enter()
1310 fprintf(compiler->verbose, " scratches:%d, saveds:%d, fscratches:%d, fsaveds:%d, local_size:%d\n", in check_sljit_emit_enter()
1317 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_set_context(struct sljit_compiler *compiler, in check_sljit_set_context() argument
1321 SLJIT_UNUSED_ARG(compiler); in check_sljit_set_context()
1340 compiler->last_flags = 0; in check_sljit_set_context()
1343 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_set_context()
1344 fprintf(compiler->verbose, " set_context ret[%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); in check_sljit_set_context()
1348 fprintf(compiler->verbose, "], args["); in check_sljit_set_context()
1350 fprintf(compiler->verbose, "%s%s", call_arg_names[arg_types & SLJIT_ARG_MASK], in check_sljit_set_context()
1354 fprintf(compiler->verbose, ","); in check_sljit_set_context()
1358 fprintf(compiler->verbose, "],"); in check_sljit_set_context()
1362 fprintf(compiler->verbose, " opt:reg_arg(%d),", SLJIT_KEPT_SAVEDS_COUNT(options)); in check_sljit_set_context()
1364 fprintf(compiler->verbose, " opt:reg_arg,"); in check_sljit_set_context()
1369 fprintf(compiler->verbose, " opt:use_vex,"); in check_sljit_set_context()
1373 fprintf(compiler->verbose, " scratches:%d, saveds:%d, fscratches:%d, fsaveds:%d, local_size:%d\n", in check_sljit_set_context()
1382 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return_void(struct sljit_compiler *compiler) in check_sljit_emit_return_void() argument
1384 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_return_void()
1385 compiler->skip_checks = 0; in check_sljit_emit_return_void()
1390 CHECK_ARGUMENT(compiler->last_return == SLJIT_ARG_TYPE_RET_VOID); in check_sljit_emit_return_void()
1394 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_return_void()
1395 fprintf(compiler->verbose, " return_void\n"); in check_sljit_emit_return_void()
1401 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return(struct sljit_compiler *compiler, slji… in check_sljit_emit_return() argument
1404 CHECK_ARGUMENT(compiler->scratches >= 0); in check_sljit_emit_return()
1406 switch (compiler->last_return) { in check_sljit_emit_return()
1435 compiler->last_flags = 0; in check_sljit_emit_return()
1438 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_return()
1440 fprintf(compiler->verbose, " return%s%s ", !(op & SLJIT_32) ? "" : "32", in check_sljit_emit_return()
1442 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_return()
1444 fprintf(compiler->verbose, " return%s ", !(op & SLJIT_32) ? ".f64" : ".f32"); in check_sljit_emit_return()
1445 sljit_verbose_fparam(compiler, src, srcw); in check_sljit_emit_return()
1447 fprintf(compiler->verbose, "\n"); in check_sljit_emit_return()
1453 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return_to(struct sljit_compiler *compiler, in check_sljit_emit_return_to() argument
1460 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_return_to()
1461 fprintf(compiler->verbose, " return_to "); in check_sljit_emit_return_to()
1462 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_return_to()
1463 fprintf(compiler->verbose, "\n"); in check_sljit_emit_return_to()
1469 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op0(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_op0() argument
1475 …CHECK_ARGUMENT(GET_OPCODE(op) < SLJIT_LMUL_UW || GET_OPCODE(op) >= SLJIT_ENDBR || compiler->scratc… in check_sljit_emit_op0()
1477 compiler->last_flags = 0; in check_sljit_emit_op0()
1480 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_emit_op0()
1482 fprintf(compiler->verbose, " %s", op0_names[GET_OPCODE(op) - SLJIT_OP0_BASE]); in check_sljit_emit_op0()
1484 fprintf(compiler->verbose, (op & SLJIT_32) ? "32" : "w"); in check_sljit_emit_op0()
1486 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op0()
1492 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op1(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_op1() argument
1496 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_op1()
1497 compiler->skip_checks = 0; in check_sljit_emit_op1()
1525 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op1()
1526 fprintf(compiler->verbose, " %s%s%s ", op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE], in check_sljit_emit_op1()
1529 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_op1()
1530 fprintf(compiler->verbose, ", "); in check_sljit_emit_op1()
1531 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_op1()
1532 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op1()
1538 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_atomic_load(struct sljit_compiler *compiler,… in check_sljit_emit_atomic_load() argument
1542 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_atomic_load()
1543 compiler->skip_checks = 0; in check_sljit_emit_atomic_load()
1564 compiler->last_flags = 0; in check_sljit_emit_atomic_load()
1567 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_atomic_load()
1568 fprintf(compiler->verbose, " atomic_load%s%s ", !(op & SLJIT_32) ? "" : "32", in check_sljit_emit_atomic_load()
1570 sljit_verbose_reg(compiler, dst_reg); in check_sljit_emit_atomic_load()
1571 fprintf(compiler->verbose, ", ["); in check_sljit_emit_atomic_load()
1572 sljit_verbose_reg(compiler, mem_reg); in check_sljit_emit_atomic_load()
1573 fprintf(compiler->verbose, "]\n"); in check_sljit_emit_atomic_load()
1579 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_atomic_store(struct sljit_compiler *compiler in check_sljit_emit_atomic_store() argument
1584 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_atomic_store()
1585 compiler->skip_checks = 0; in check_sljit_emit_atomic_store()
1609 compiler->last_flags = GET_FLAG_TYPE(op) | (op & SLJIT_32); in check_sljit_emit_atomic_store()
1612 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_atomic_store()
1613 fprintf(compiler->verbose, " atomic_store%s%s%s ", !(op & SLJIT_32) ? "" : "32", in check_sljit_emit_atomic_store()
1615 sljit_verbose_reg(compiler, src_reg); in check_sljit_emit_atomic_store()
1616 fprintf(compiler->verbose, ", ["); in check_sljit_emit_atomic_store()
1617 sljit_verbose_reg(compiler, mem_reg); in check_sljit_emit_atomic_store()
1618 fprintf(compiler->verbose, "], "); in check_sljit_emit_atomic_store()
1619 sljit_verbose_reg(compiler, temp_reg); in check_sljit_emit_atomic_store()
1620 fprintf(compiler->verbose, "\n"); in check_sljit_emit_atomic_store()
1626 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op2(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_op2() argument
1631 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_op2()
1632 compiler->skip_checks = 0; in check_sljit_emit_op2()
1670 CHECK_ARGUMENT((compiler->last_flags & 0xff) == GET_FLAG_TYPE(SLJIT_SET_CARRY)); in check_sljit_emit_op2()
1671 CHECK_ARGUMENT((op & SLJIT_32) == (compiler->last_flags & SLJIT_32)); in check_sljit_emit_op2()
1689 compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_32 | SLJIT_SET_Z)); in check_sljit_emit_op2()
1692 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op2()
1693 …fprintf(compiler->verbose, " %s%s%s%s%s ", op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], !(op & SLJ… in check_sljit_emit_op2()
1697 fprintf(compiler->verbose, "unset"); in check_sljit_emit_op2()
1699 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_op2()
1700 fprintf(compiler->verbose, ", "); in check_sljit_emit_op2()
1701 sljit_verbose_param(compiler, src1, src1w); in check_sljit_emit_op2()
1702 fprintf(compiler->verbose, ", "); in check_sljit_emit_op2()
1703 sljit_verbose_param(compiler, src2, src2w); in check_sljit_emit_op2()
1704 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op2()
1710 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op2r(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_op2r() argument
1720 compiler->last_flags = 0; in check_sljit_emit_op2r()
1723 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op2r()
1724 …fprintf(compiler->verbose, " %s%s ", op2r_names[GET_OPCODE(op) - SLJIT_OP2R_BASE], !(op & SLJIT_3… in check_sljit_emit_op2r()
1726 sljit_verbose_reg(compiler, dst_reg); in check_sljit_emit_op2r()
1727 fprintf(compiler->verbose, ", "); in check_sljit_emit_op2r()
1728 sljit_verbose_param(compiler, src1, src1w); in check_sljit_emit_op2r()
1729 fprintf(compiler->verbose, ", "); in check_sljit_emit_op2r()
1730 sljit_verbose_param(compiler, src2, src2w); in check_sljit_emit_op2r()
1731 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op2r()
1737 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_shift_into(struct sljit_compiler *compiler, … in check_sljit_emit_shift_into() argument
1754 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_shift_into()
1755 …fprintf(compiler->verbose, " %s%s.into%s ", op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], !(op & SL… in check_sljit_emit_shift_into()
1758 sljit_verbose_reg(compiler, dst_reg); in check_sljit_emit_shift_into()
1759 fprintf(compiler->verbose, ", "); in check_sljit_emit_shift_into()
1760 sljit_verbose_reg(compiler, src1_reg); in check_sljit_emit_shift_into()
1761 fprintf(compiler->verbose, ", "); in check_sljit_emit_shift_into()
1762 sljit_verbose_reg(compiler, src2_reg); in check_sljit_emit_shift_into()
1763 fprintf(compiler->verbose, ", "); in check_sljit_emit_shift_into()
1764 sljit_verbose_param(compiler, src3, src3w); in check_sljit_emit_shift_into()
1765 fprintf(compiler->verbose, "\n"); in check_sljit_emit_shift_into()
1771 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_src(struct sljit_compiler *compiler, slji… in check_sljit_emit_op_src() argument
1780 compiler->last_flags = 0; in check_sljit_emit_op_src()
1786 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op_src()
1787 fprintf(compiler->verbose, " %s ", op_src_dst_names[op - SLJIT_OP_SRC_DST_BASE]); in check_sljit_emit_op_src()
1788 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_op_src()
1789 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op_src()
1795 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_dst(struct sljit_compiler *compiler, slji… in check_sljit_emit_op_dst() argument
1803 compiler->last_flags = 0; in check_sljit_emit_op_dst()
1806 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op_dst()
1807 fprintf(compiler->verbose, " %s ", op_src_dst_names[op - SLJIT_OP_SRC_DST_BASE]); in check_sljit_emit_op_dst()
1808 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_op_dst()
1809 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op_dst()
1832 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_custom(struct sljit_compiler *compiler, in check_sljit_emit_op_custom() argument
1839 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_op_custom()
1855 compiler->last_flags = 0; in check_sljit_emit_op_custom()
1858 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op_custom()
1859 fprintf(compiler->verbose, " op_custom"); in check_sljit_emit_op_custom()
1861 fprintf(compiler->verbose, " 0x%x", ((sljit_u8*)instruction)[i]); in check_sljit_emit_op_custom()
1862 fprintf(compiler->verbose, "\n"); in check_sljit_emit_op_custom()
1868 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_fop1() argument
1872 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1()
1873 compiler->skip_checks = 0; in check_sljit_emit_fop1()
1885 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1()
1887 fprintf(compiler->verbose, " %s%s ", fop1_names[SLJIT_CONV_F64_FROM_F32 - SLJIT_FOP1_BASE], in check_sljit_emit_fop1()
1890 fprintf(compiler->verbose, " %s%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1()
1893 sljit_verbose_fparam(compiler, dst, dstw); in check_sljit_emit_fop1()
1894 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1()
1895 sljit_verbose_fparam(compiler, src, srcw); in check_sljit_emit_fop1()
1896 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1()
1902 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sl… in check_sljit_emit_fop1_cmp() argument
1907 compiler->last_flags = GET_FLAG_TYPE(op) | (op & SLJIT_32); in check_sljit_emit_fop1_cmp()
1910 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1_cmp()
1911 compiler->skip_checks = 0; in check_sljit_emit_fop1_cmp()
1925 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1_cmp()
1926 …fprintf(compiler->verbose, " %s%s", fop1_names[SLJIT_CMP_F64 - SLJIT_FOP1_BASE], (op & SLJIT_32) … in check_sljit_emit_fop1_cmp()
1928 fprintf(compiler->verbose, ".%s", jump_names[GET_FLAG_TYPE(op)]); in check_sljit_emit_fop1_cmp()
1930 fprintf(compiler->verbose, " "); in check_sljit_emit_fop1_cmp()
1931 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fop1_cmp()
1932 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1_cmp()
1933 sljit_verbose_fparam(compiler, src2, src2w); in check_sljit_emit_fop1_cmp()
1934 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1_cmp()
1940 …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
1944 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1_conv_sw_from_f64()
1945 compiler->skip_checks = 0; in check_sljit_emit_fop1_conv_sw_from_f64()
1956 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1_conv_sw_from_f64()
1957 fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1_conv_sw_from_f64()
1960 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_fop1_conv_sw_from_f64()
1961 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1_conv_sw_from_f64()
1962 sljit_verbose_fparam(compiler, src, srcw); in check_sljit_emit_fop1_conv_sw_from_f64()
1963 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1_conv_sw_from_f64()
1969 …CK_RETURN_TYPE check_sljit_emit_fop1_conv_f64_from_w(struct sljit_compiler *compiler, sljit_s32 op, in check_sljit_emit_fop1_conv_f64_from_w() argument
1973 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop1_conv_f64_from_w()
1974 compiler->skip_checks = 0; in check_sljit_emit_fop1_conv_f64_from_w()
1985 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop1_conv_f64_from_w()
1986 fprintf(compiler->verbose, " %s%s.from.%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE], in check_sljit_emit_fop1_conv_f64_from_w()
1989 sljit_verbose_fparam(compiler, dst, dstw); in check_sljit_emit_fop1_conv_f64_from_w()
1990 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop1_conv_f64_from_w()
1991 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_fop1_conv_f64_from_w()
1992 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop1_conv_f64_from_w()
1998 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop2(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_fop2() argument
2003 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fop2()
2004 compiler->skip_checks = 0; in check_sljit_emit_fop2()
2017 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop2()
2018 …fprintf(compiler->verbose, " %s%s ", fop2_names[GET_OPCODE(op) - SLJIT_FOP2_BASE], (op & SLJIT_32… in check_sljit_emit_fop2()
2019 sljit_verbose_fparam(compiler, dst, dstw); in check_sljit_emit_fop2()
2020 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop2()
2021 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fop2()
2022 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop2()
2023 sljit_verbose_fparam(compiler, src2, src2w); in check_sljit_emit_fop2()
2024 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop2()
2030 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop2r(struct sljit_compiler *compiler, sljit… in check_sljit_emit_fop2r() argument
2043 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fop2r()
2044 …fprintf(compiler->verbose, " %s%s ", fop2r_names[GET_OPCODE(op) - SLJIT_FOP2R_BASE], (op & SLJIT_… in check_sljit_emit_fop2r()
2045 sljit_verbose_freg(compiler, dst_freg); in check_sljit_emit_fop2r()
2046 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop2r()
2047 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fop2r()
2048 fprintf(compiler->verbose, ", "); in check_sljit_emit_fop2r()
2049 sljit_verbose_fparam(compiler, src2, src2w); in check_sljit_emit_fop2r()
2050 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fop2r()
2056 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fset32(struct sljit_compiler *compiler, in check_sljit_emit_fset32() argument
2061 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fset32()
2062 compiler->skip_checks = 0; in check_sljit_emit_fset32()
2071 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fset32()
2072 fprintf(compiler->verbose, " fset32 "); in check_sljit_emit_fset32()
2073 sljit_verbose_freg(compiler, freg); in check_sljit_emit_fset32()
2074 fprintf(compiler->verbose, ", %f\n", value); in check_sljit_emit_fset32()
2080 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fset64(struct sljit_compiler *compiler, in check_sljit_emit_fset64() argument
2085 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_fset64()
2086 compiler->skip_checks = 0; in check_sljit_emit_fset64()
2095 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fset64()
2096 fprintf(compiler->verbose, " fset64 "); in check_sljit_emit_fset64()
2097 sljit_verbose_freg(compiler, freg); in check_sljit_emit_fset64()
2098 fprintf(compiler->verbose, ", %f\n", value); in check_sljit_emit_fset64()
2104 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fcopy(struct sljit_compiler *compiler, sljit… in check_sljit_emit_fcopy() argument
2140 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fcopy()
2141 fprintf(compiler->verbose, " copy%s_%s_f%s ", (op & SLJIT_32) ? "32" : "", in check_sljit_emit_fcopy()
2144 sljit_verbose_freg(compiler, freg); in check_sljit_emit_fcopy()
2147 fprintf(compiler->verbose, ", {"); in check_sljit_emit_fcopy()
2148 sljit_verbose_reg(compiler, REG_PAIR_FIRST(reg)); in check_sljit_emit_fcopy()
2149 fprintf(compiler->verbose, ", "); in check_sljit_emit_fcopy()
2150 sljit_verbose_reg(compiler, REG_PAIR_SECOND(reg)); in check_sljit_emit_fcopy()
2151 fprintf(compiler->verbose, "}\n"); in check_sljit_emit_fcopy()
2153 fprintf(compiler->verbose, ", "); in check_sljit_emit_fcopy()
2154 sljit_verbose_reg(compiler, reg); in check_sljit_emit_fcopy()
2155 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fcopy()
2162 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_label(struct sljit_compiler *compiler) in check_sljit_emit_label() argument
2164 SLJIT_UNUSED_ARG(compiler); in check_sljit_emit_label()
2166 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_label()
2167 compiler->skip_checks = 0; in check_sljit_emit_label()
2172 compiler->last_flags = 0; in check_sljit_emit_label()
2176 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_emit_label()
2177 fprintf(compiler->verbose, "label:\n"); in check_sljit_emit_label()
2193 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_jump() argument
2195 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_jump()
2196 compiler->skip_checks = 0; in check_sljit_emit_jump()
2206 CHECK_ARGUMENT(compiler->last_flags & SLJIT_SET_Z); in check_sljit_emit_jump()
2207 else if ((compiler->last_flags & 0xff) == SLJIT_CARRY) { in check_sljit_emit_jump()
2209 compiler->last_flags = 0; in check_sljit_emit_jump()
2211 CHECK_ARGUMENT((type & 0xfe) == (compiler->last_flags & 0xff) in check_sljit_emit_jump()
2212 || CHECK_UNORDERED(type, compiler->last_flags)); in check_sljit_emit_jump()
2216 if (SLJIT_UNLIKELY(!!compiler->verbose)) in check_sljit_emit_jump()
2217 fprintf(compiler->verbose, " jump%s %s\n", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", in check_sljit_emit_jump()
2223 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_call(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_call() argument
2229 CHECK_ARGUMENT(function_check_arguments(arg_types, compiler->scratches, -1, compiler->fscratches)); in check_sljit_emit_call()
2232 CHECK_ARGUMENT((arg_types & SLJIT_ARG_MASK) == compiler->last_return); in check_sljit_emit_call()
2234 if (compiler->options & SLJIT_ENTER_REG_ARG) { in check_sljit_emit_call()
2242 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_call()
2243 fprintf(compiler->verbose, " %s%s%s ret[%s", jump_names[type & 0xff], in check_sljit_emit_call()
2250 fprintf(compiler->verbose, "], args["); in check_sljit_emit_call()
2252 fprintf(compiler->verbose, "%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); in check_sljit_emit_call()
2255 fprintf(compiler->verbose, ","); in check_sljit_emit_call()
2258 fprintf(compiler->verbose, "]\n"); in check_sljit_emit_call()
2264 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_cmp() argument
2273 compiler->last_flags = 0; in check_sljit_emit_cmp()
2276 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_cmp()
2277 fprintf(compiler->verbose, " cmp%s%s %s, ", (type & SLJIT_32) ? "32" : "", in check_sljit_emit_cmp()
2279 sljit_verbose_param(compiler, src1, src1w); in check_sljit_emit_cmp()
2280 fprintf(compiler->verbose, ", "); in check_sljit_emit_cmp()
2281 sljit_verbose_param(compiler, src2, src2w); in check_sljit_emit_cmp()
2282 fprintf(compiler->verbose, "\n"); in check_sljit_emit_cmp()
2288 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_fcmp() argument
2298 compiler->last_flags = 0; in check_sljit_emit_fcmp()
2301 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fcmp()
2302 fprintf(compiler->verbose, " fcmp%s%s %s, ", (type & SLJIT_32) ? ".f32" : ".f64", in check_sljit_emit_fcmp()
2304 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fcmp()
2305 fprintf(compiler->verbose, ", "); in check_sljit_emit_fcmp()
2306 sljit_verbose_fparam(compiler, src2, src2w); in check_sljit_emit_fcmp()
2307 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fcmp()
2313 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_ijump(struct sljit_compiler *compiler, sljit… in check_sljit_emit_ijump() argument
2316 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_ijump()
2317 compiler->skip_checks = 0; in check_sljit_emit_ijump()
2326 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_ijump()
2327 fprintf(compiler->verbose, " ijump.%s ", jump_names[type]); in check_sljit_emit_ijump()
2328 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_ijump()
2329 fprintf(compiler->verbose, "\n"); in check_sljit_emit_ijump()
2335 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_icall(struct sljit_compiler *compiler, sljit… in check_sljit_emit_icall() argument
2342 CHECK_ARGUMENT(function_check_arguments(arg_types, compiler->scratches, -1, compiler->fscratches)); in check_sljit_emit_icall()
2346 CHECK_ARGUMENT((arg_types & SLJIT_ARG_MASK) == compiler->last_return); in check_sljit_emit_icall()
2348 if (compiler->options & SLJIT_ENTER_REG_ARG) { in check_sljit_emit_icall()
2356 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_icall()
2357 fprintf(compiler->verbose, " i%s%s ret[%s", jump_names[type & 0xff], in check_sljit_emit_icall()
2363 fprintf(compiler->verbose, "], args["); in check_sljit_emit_icall()
2365 fprintf(compiler->verbose, "%s", call_arg_names[arg_types & SLJIT_ARG_MASK]); in check_sljit_emit_icall()
2368 fprintf(compiler->verbose, ","); in check_sljit_emit_icall()
2371 fprintf(compiler->verbose, "], "); in check_sljit_emit_icall()
2372 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_icall()
2373 fprintf(compiler->verbose, "\n"); in check_sljit_emit_icall()
2379 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_flags(struct sljit_compiler *compiler, sl… in check_sljit_emit_op_flags() argument
2390 CHECK_ARGUMENT(compiler->last_flags & SLJIT_SET_Z); in check_sljit_emit_op_flags()
2392 CHECK_ARGUMENT((type & 0xfe) == (compiler->last_flags & 0xff) in check_sljit_emit_op_flags()
2393 || CHECK_UNORDERED(type, compiler->last_flags)); in check_sljit_emit_op_flags()
2398 compiler->last_flags = GET_FLAG_TYPE(op) | (op & (SLJIT_32 | SLJIT_SET_Z)); in check_sljit_emit_op_flags()
2401 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_op_flags()
2402 fprintf(compiler->verbose, " flags.%s%s%s ", in check_sljit_emit_op_flags()
2406 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_op_flags()
2407 fprintf(compiler->verbose, ", %s\n", jump_names[type]); in check_sljit_emit_op_flags()
2413 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_select(struct sljit_compiler *compiler, slji… in check_sljit_emit_select() argument
2423 CHECK_ARGUMENT(compiler->scratches != -1 && compiler->saveds != -1); in check_sljit_emit_select()
2429 CHECK_ARGUMENT(compiler->last_flags & SLJIT_SET_Z); in check_sljit_emit_select()
2430 else if ((compiler->last_flags & 0xff) == SLJIT_CARRY) { in check_sljit_emit_select()
2432 compiler->last_flags = 0; in check_sljit_emit_select()
2434 CHECK_ARGUMENT((cond & 0xfe) == (compiler->last_flags & 0xff) in check_sljit_emit_select()
2435 || CHECK_UNORDERED(cond, compiler->last_flags)); in check_sljit_emit_select()
2438 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_select()
2439 fprintf(compiler->verbose, " select%s %s, ", in check_sljit_emit_select()
2442 sljit_verbose_reg(compiler, dst_reg); in check_sljit_emit_select()
2443 fprintf(compiler->verbose, ", "); in check_sljit_emit_select()
2444 sljit_verbose_param(compiler, src1, src1w); in check_sljit_emit_select()
2445 fprintf(compiler->verbose, ", "); in check_sljit_emit_select()
2446 sljit_verbose_reg(compiler, src2_reg); in check_sljit_emit_select()
2447 fprintf(compiler->verbose, "\n"); in check_sljit_emit_select()
2453 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fselect(struct sljit_compiler *compiler, slj… in check_sljit_emit_fselect() argument
2463 CHECK_ARGUMENT(compiler->fscratches != -1 && compiler->fsaveds != -1); in check_sljit_emit_fselect()
2469 CHECK_ARGUMENT(compiler->last_flags & SLJIT_SET_Z); in check_sljit_emit_fselect()
2470 else if ((compiler->last_flags & 0xff) == SLJIT_CARRY) { in check_sljit_emit_fselect()
2472 compiler->last_flags = 0; in check_sljit_emit_fselect()
2474 CHECK_ARGUMENT((cond & 0xfe) == (compiler->last_flags & 0xff) in check_sljit_emit_fselect()
2475 || CHECK_UNORDERED(cond, compiler->last_flags)); in check_sljit_emit_fselect()
2478 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fselect()
2479 fprintf(compiler->verbose, " fselect%s %s, ", in check_sljit_emit_fselect()
2482 sljit_verbose_freg(compiler, dst_freg); in check_sljit_emit_fselect()
2483 fprintf(compiler->verbose, ", "); in check_sljit_emit_fselect()
2484 sljit_verbose_fparam(compiler, src1, src1w); in check_sljit_emit_fselect()
2485 fprintf(compiler->verbose, ", "); in check_sljit_emit_fselect()
2486 sljit_verbose_freg(compiler, src2_freg); in check_sljit_emit_fselect()
2487 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fselect()
2493 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_mem(struct sljit_compiler *compiler, sljit_s… in check_sljit_emit_mem() argument
2501 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_mem()
2502 compiler->skip_checks = 0; in check_sljit_emit_mem()
2545 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_mem()
2547 fprintf(compiler->verbose, " %s32", in check_sljit_emit_mem()
2550 fprintf(compiler->verbose, " %s%s%s", in check_sljit_emit_mem()
2562 fprintf(compiler->verbose, " {"); in check_sljit_emit_mem()
2563 sljit_verbose_reg(compiler, REG_PAIR_FIRST(reg)); in check_sljit_emit_mem()
2564 fprintf(compiler->verbose, ", "); in check_sljit_emit_mem()
2565 sljit_verbose_reg(compiler, REG_PAIR_SECOND(reg)); in check_sljit_emit_mem()
2566 fprintf(compiler->verbose, "}, "); in check_sljit_emit_mem()
2568 fprintf(compiler->verbose, " "); in check_sljit_emit_mem()
2569 sljit_verbose_reg(compiler, reg); in check_sljit_emit_mem()
2570 fprintf(compiler->verbose, ", "); in check_sljit_emit_mem()
2572 sljit_verbose_param(compiler, mem, memw); in check_sljit_emit_mem()
2573 fprintf(compiler->verbose, "\n"); in check_sljit_emit_mem()
2579 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_mem_update(struct sljit_compiler *compiler, … in check_sljit_emit_mem_update() argument
2583 if (SLJIT_UNLIKELY(compiler->skip_checks)) { in check_sljit_emit_mem_update()
2584 compiler->skip_checks = 0; in check_sljit_emit_mem_update()
2596 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_mem_update()
2599 …if (sljit_emit_mem_update(compiler, type | SLJIT_MEM_SUPP, reg, mem, memw) == SLJIT_ERR_UNSUPPORTE… in check_sljit_emit_mem_update()
2600 fprintf(compiler->verbose, " # mem: unsupported form, no instructions are emitted\n"); in check_sljit_emit_mem_update()
2605 fprintf(compiler->verbose, " %s32.%s ", in check_sljit_emit_mem_update()
2609 fprintf(compiler->verbose, " %s%s%s.%s ", in check_sljit_emit_mem_update()
2615 sljit_verbose_reg(compiler, reg); in check_sljit_emit_mem_update()
2616 fprintf(compiler->verbose, ", "); in check_sljit_emit_mem_update()
2617 sljit_verbose_param(compiler, mem, memw); in check_sljit_emit_mem_update()
2618 fprintf(compiler->verbose, "\n"); in check_sljit_emit_mem_update()
2624 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fmem(struct sljit_compiler *compiler, sljit_… in check_sljit_emit_fmem() argument
2646 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fmem()
2647 fprintf(compiler->verbose, " %s.%s", in check_sljit_emit_fmem()
2658 fprintf(compiler->verbose, " "); in check_sljit_emit_fmem()
2659 sljit_verbose_freg(compiler, freg); in check_sljit_emit_fmem()
2660 fprintf(compiler->verbose, ", "); in check_sljit_emit_fmem()
2661 sljit_verbose_param(compiler, mem, memw); in check_sljit_emit_fmem()
2662 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fmem()
2668 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fmem_update(struct sljit_compiler *compiler,… in check_sljit_emit_fmem_update() argument
2680 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_fmem_update()
2683 …if (sljit_emit_fmem_update(compiler, type | SLJIT_MEM_SUPP, freg, mem, memw) == SLJIT_ERR_UNSUPPOR… in check_sljit_emit_fmem_update()
2684 fprintf(compiler->verbose, " # fmem: unsupported form, no instructions are emitted\n"); in check_sljit_emit_fmem_update()
2688 fprintf(compiler->verbose, " %s.%s.%s ", in check_sljit_emit_fmem_update()
2693 sljit_verbose_freg(compiler, freg); in check_sljit_emit_fmem_update()
2694 fprintf(compiler->verbose, ", "); in check_sljit_emit_fmem_update()
2695 sljit_verbose_param(compiler, mem, memw); in check_sljit_emit_fmem_update()
2696 fprintf(compiler->verbose, "\n"); in check_sljit_emit_fmem_update()
2702 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_simd_mov(struct sljit_compiler *compiler, sl… in check_sljit_emit_simd_mov() argument
2716 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_simd_mov()
2719 …if (sljit_emit_simd_mov(compiler, type | SLJIT_SIMD_TEST, freg, srcdst, srcdstw) == SLJIT_ERR_UNSU… in check_sljit_emit_simd_mov()
2720 fprintf(compiler->verbose, " # simd_mem: unsupported form, no instructions are emitted\n"); in check_sljit_emit_simd_mov()
2724 fprintf(compiler->verbose, " simd_%s.%d.%s%d", in check_sljit_emit_simd_mov()
2731 fprintf(compiler->verbose, ".unal "); in check_sljit_emit_simd_mov()
2733 fprintf(compiler->verbose, ".al%d ", (8 << SLJIT_SIMD_GET_ELEM2_SIZE(type))); in check_sljit_emit_simd_mov()
2735 sljit_verbose_freg(compiler, freg); in check_sljit_emit_simd_mov()
2736 fprintf(compiler->verbose, ", "); in check_sljit_emit_simd_mov()
2737 sljit_verbose_fparam(compiler, srcdst, srcdstw); in check_sljit_emit_simd_mov()
2738 fprintf(compiler->verbose, "\n"); in check_sljit_emit_simd_mov()
2744 … CHECK_RETURN_TYPE check_sljit_emit_simd_replicate(struct sljit_compiler *compiler, sljit_s32 type, in check_sljit_emit_simd_replicate() argument
2766 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_simd_replicate()
2769 …if (sljit_emit_simd_replicate(compiler, type | SLJIT_SIMD_TEST, freg, src, srcw) == SLJIT_ERR_UNSU… in check_sljit_emit_simd_replicate()
2770 fprintf(compiler->verbose, " # simd_dup: unsupported form, no instructions are emitted\n"); in check_sljit_emit_simd_replicate()
2774 fprintf(compiler->verbose, " simd_replicate.%d.%s%d ", in check_sljit_emit_simd_replicate()
2779 sljit_verbose_freg(compiler, freg); in check_sljit_emit_simd_replicate()
2780 fprintf(compiler->verbose, ", "); in check_sljit_emit_simd_replicate()
2782 sljit_verbose_fparam(compiler, src, srcw); in check_sljit_emit_simd_replicate()
2784 sljit_verbose_param(compiler, src, srcw); in check_sljit_emit_simd_replicate()
2785 fprintf(compiler->verbose, "\n"); in check_sljit_emit_simd_replicate()
2791 …E CHECK_RETURN_TYPE check_sljit_emit_simd_lane_mov(struct sljit_compiler *compiler, sljit_s32 type, in check_sljit_emit_simd_lane_mov() argument
2814 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_simd_lane_mov()
2817 …if (sljit_emit_simd_lane_mov(compiler, type | SLJIT_SIMD_TEST, freg, lane_index, srcdst, srcdstw) … in check_sljit_emit_simd_lane_mov()
2818 …fprintf(compiler->verbose, " # simd_move_lane: unsupported form, no instructions are emitted\n"… in check_sljit_emit_simd_lane_mov()
2822 fprintf(compiler->verbose, " simd_%s_lane%s%s%s.%d.%s%d ", in check_sljit_emit_simd_lane_mov()
2831 sljit_verbose_freg(compiler, freg); in check_sljit_emit_simd_lane_mov()
2832 fprintf(compiler->verbose, "[%d], ", lane_index); in check_sljit_emit_simd_lane_mov()
2834 sljit_verbose_fparam(compiler, srcdst, srcdstw); in check_sljit_emit_simd_lane_mov()
2836 sljit_verbose_param(compiler, srcdst, srcdstw); in check_sljit_emit_simd_lane_mov()
2837 fprintf(compiler->verbose, "\n"); in check_sljit_emit_simd_lane_mov()
2843 …K_RETURN_TYPE check_sljit_emit_simd_lane_replicate(struct sljit_compiler *compiler, sljit_s32 type, in check_sljit_emit_simd_lane_replicate() argument
2857 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_simd_lane_replicate()
2860 …if (sljit_emit_simd_lane_replicate(compiler, type | SLJIT_SIMD_TEST, freg, src, src_lane_index) ==… in check_sljit_emit_simd_lane_replicate()
2861 …fprintf(compiler->verbose, " # simd_lane_replicate: unsupported form, no instructions are emitt… in check_sljit_emit_simd_lane_replicate()
2865 fprintf(compiler->verbose, " simd_lane_replicate.%d.%s%d ", in check_sljit_emit_simd_lane_replicate()
2870 sljit_verbose_freg(compiler, freg); in check_sljit_emit_simd_lane_replicate()
2871 fprintf(compiler->verbose, ", "); in check_sljit_emit_simd_lane_replicate()
2872 sljit_verbose_freg(compiler, src); in check_sljit_emit_simd_lane_replicate()
2873 fprintf(compiler->verbose, "[%d]\n", src_lane_index); in check_sljit_emit_simd_lane_replicate()
2879 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_simd_extend(struct sljit_compiler *compiler,… in check_sljit_emit_simd_extend() argument
2894 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_simd_extend()
2897 …if (sljit_emit_simd_extend(compiler, type | SLJIT_SIMD_TEST, freg, src, srcw) == SLJIT_ERR_UNSUPPO… in check_sljit_emit_simd_extend()
2898 fprintf(compiler->verbose, " # simd_extend: unsupported form, no instructions are emitted\n"); in check_sljit_emit_simd_extend()
2902 fprintf(compiler->verbose, " simd_load_extend%s.%d.%s%d.%s%d ", in check_sljit_emit_simd_extend()
2910 sljit_verbose_freg(compiler, freg); in check_sljit_emit_simd_extend()
2911 fprintf(compiler->verbose, ", "); in check_sljit_emit_simd_extend()
2912 sljit_verbose_fparam(compiler, src, srcw); in check_sljit_emit_simd_extend()
2913 fprintf(compiler->verbose, "\n"); in check_sljit_emit_simd_extend()
2919 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_simd_sign(struct sljit_compiler *compiler, s… in check_sljit_emit_simd_sign() argument
2932 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_simd_sign()
2935 …if (sljit_emit_simd_sign(compiler, type | SLJIT_SIMD_TEST, freg, dst, dstw) == SLJIT_ERR_UNSUPPORT… in check_sljit_emit_simd_sign()
2936 fprintf(compiler->verbose, " # simd_sign: unsupported form, no instructions are emitted\n"); in check_sljit_emit_simd_sign()
2940 fprintf(compiler->verbose, " simd_store_sign%s.%d.%s%d ", in check_sljit_emit_simd_sign()
2946 sljit_verbose_freg(compiler, freg); in check_sljit_emit_simd_sign()
2947 fprintf(compiler->verbose, ", "); in check_sljit_emit_simd_sign()
2948 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_simd_sign()
2949 fprintf(compiler->verbose, "\n"); in check_sljit_emit_simd_sign()
2955 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_simd_op2(struct sljit_compiler *compiler, sl… in check_sljit_emit_simd_op2() argument
2968 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_simd_op2()
2971 …if (sljit_emit_simd_op2(compiler, type | SLJIT_SIMD_TEST, dst_freg, src1_freg, src2_freg) == SLJIT… in check_sljit_emit_simd_op2()
2972 fprintf(compiler->verbose, " # simd_op2: unsupported form, no instructions are emitted\n"); in check_sljit_emit_simd_op2()
2976 fprintf(compiler->verbose, " simd_%s.%d.%s%d ", in check_sljit_emit_simd_op2()
2982 sljit_verbose_freg(compiler, dst_freg); in check_sljit_emit_simd_op2()
2983 fprintf(compiler->verbose, ", "); in check_sljit_emit_simd_op2()
2984 sljit_verbose_freg(compiler, src1_freg); in check_sljit_emit_simd_op2()
2985 fprintf(compiler->verbose, ", "); in check_sljit_emit_simd_op2()
2986 sljit_verbose_freg(compiler, src2_freg); in check_sljit_emit_simd_op2()
2987 fprintf(compiler->verbose, "\n"); in check_sljit_emit_simd_op2()
2993 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_get_local_base(struct sljit_compiler *compiler, s… in check_sljit_get_local_base() argument
3002 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_get_local_base()
3003 fprintf(compiler->verbose, " local_base "); in check_sljit_get_local_base()
3004 sljit_verbose_param(compiler, dst, dstw); in check_sljit_get_local_base()
3005 fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", offset); in check_sljit_get_local_base()
3011 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_const(struct sljit_compiler *compiler, sljit… in check_sljit_emit_const() argument
3019 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_const()
3020 fprintf(compiler->verbose, " const "); in check_sljit_emit_const()
3021 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_const()
3022 fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", init_value); in check_sljit_emit_const()
3028 static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_mov_addr(struct sljit_compiler *compiler, sl… in check_sljit_emit_mov_addr() argument
3034 if (SLJIT_UNLIKELY(!!compiler->verbose)) { in check_sljit_emit_mov_addr()
3035 fprintf(compiler->verbose, " mov_addr "); in check_sljit_emit_mov_addr()
3036 sljit_verbose_param(compiler, dst, dstw); in check_sljit_emit_mov_addr()
3037 fprintf(compiler->verbose, "\n"); in check_sljit_emit_mov_addr()
3045 #define SLJIT_SKIP_CHECKS(compiler) argument
3049 #define SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw) \ argument
3054 CHECK(check_sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw)); \
3057 return sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw); \
3060 CHECK(check_sljit_emit_fop1_conv_sw_from_f64(compiler, op, dst, dstw, src, srcw)); \
3063 return sljit_emit_fop1_conv_sw_from_f64(compiler, op, dst, dstw, src, srcw); \
3066 CHECK(check_sljit_emit_fop1_conv_f64_from_w(compiler, op, dst, dstw, src, srcw)); \
3069 return sljit_emit_fop1_conv_f64_from_sw(compiler, op, dst, dstw, src, srcw); \
3071 CHECK(check_sljit_emit_fop1_conv_f64_from_w(compiler, op, dst, dstw, src, srcw)); \
3074 return sljit_emit_fop1_conv_f64_from_uw(compiler, op, dst, dstw, src, srcw); \
3076 CHECK(check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw)); \
3082 static sljit_s32 sljit_emit_mem_unaligned(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_mem_unaligned() argument
3086 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_mem_unaligned()
3089 return sljit_emit_op1(compiler, type & (0xff | SLJIT_32), mem, memw, reg, 0); in sljit_emit_mem_unaligned()
3090 return sljit_emit_op1(compiler, type & (0xff | SLJIT_32), reg, 0, mem, memw); in sljit_emit_mem_unaligned()
3098 static sljit_s32 sljit_emit_fmem_unaligned(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_fmem_unaligned() argument
3102 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_fmem_unaligned()
3105 return sljit_emit_fop1(compiler, type & (0xff | SLJIT_32), mem, memw, freg, 0); in sljit_emit_fmem_unaligned()
3106 return sljit_emit_fop1(compiler, type & (0xff | SLJIT_32), freg, 0, mem, memw); in sljit_emit_fmem_unaligned()
3161 static SLJIT_INLINE sljit_s32 emit_mov_before_return(struct sljit_compiler *compiler, sljit_s32 op,… in emit_mov_before_return() argument
3172 SLJIT_SKIP_CHECKS(compiler); in emit_mov_before_return()
3173 return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw); in emit_mov_before_return()
3179 static SLJIT_INLINE sljit_s32 emit_fmov_before_return(struct sljit_compiler *compiler, sljit_s32 op… in emit_fmov_before_return() argument
3184 SLJIT_SKIP_CHECKS(compiler); in emit_fmov_before_return()
3185 return sljit_emit_fop1(compiler, op, SLJIT_RETURN_FREG, 0, src, srcw); in emit_fmov_before_return()
3190 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op,… in sljit_emit_return() argument
3193 CHECK(check_sljit_emit_return(compiler, op, src, srcw)); in sljit_emit_return()
3196 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
3198 FAIL_IF(emit_fmov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
3201 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_return()
3202 return sljit_emit_return_void(compiler); in sljit_emit_return()
3209 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2r(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop2r() argument
3215 CHECK(check_sljit_emit_fop2r(compiler, op, dst_freg, src1, src1w, src2, src2w)); in sljit_emit_fop2r()
3219 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_fop2r()
3220 return sljit_emit_fop2(compiler, op, dst_freg, 0, src1, src1w, src2, src2w); in sljit_emit_fop2r()
3229 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s… in sljit_emit_cmp() argument
3238 CHECK_PTR(check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w)); in sljit_emit_cmp()
3250 return emit_cmp_to0(compiler, type, src1, src1w); in sljit_emit_cmp()
3297 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_cmp()
3298 PTR_FAIL_IF(sljit_emit_op2u(compiler, in sljit_emit_cmp()
3301 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_cmp()
3302 return sljit_emit_jump(compiler, condition | (type & (SLJIT_REWRITABLE_JUMP | SLJIT_32))); in sljit_emit_cmp()
3322 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_… in sljit_emit_fcmp() argument
3327 CHECK_PTR(check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w)); in sljit_emit_fcmp()
3329 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_fcmp()
3330 …sljit_emit_fop1(compiler, SLJIT_CMP_F64 | ((type & 0xfe) << VARIABLE_FLAG_SHIFT) | (type & SLJIT_3… in sljit_emit_fcmp()
3332 SLJIT_SKIP_CHECKS(compiler); in sljit_emit_fcmp()
3333 return sljit_emit_jump(compiler, type); in sljit_emit_fcmp()
3339 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem_update(struct sljit_compiler *compiler, sljit_s32… in sljit_emit_mem_update() argument
3344 CHECK(check_sljit_emit_mem_update(compiler, type, reg, mem, memw)); in sljit_emit_mem_update()
3358 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_fmem() argument
3363 CHECK(check_sljit_emit_fmem(compiler, type, freg, mem, memw)); in sljit_emit_fmem()
3365 return sljit_emit_fmem_unaligned(compiler, type, freg, mem, memw); in sljit_emit_fmem()
3373 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fmem_update(struct sljit_compiler *compiler, sljit_s3… in sljit_emit_fmem_update() argument
3378 CHECK(check_sljit_emit_fmem_update(compiler, type, freg, mem, memw)); in sljit_emit_fmem_update()
3394 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_mov(struct sljit_compiler *compiler, sljit_s32 t… in sljit_emit_simd_mov() argument
3399 CHECK(check_sljit_emit_simd_mov(compiler, type, freg, srcdst, srcdstw)); in sljit_emit_simd_mov()
3400 SLJIT_UNUSED_ARG(compiler); in sljit_emit_simd_mov()
3409 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_replicate(struct sljit_compiler *compiler, sljit… in sljit_emit_simd_replicate() argument
3414 CHECK(check_sljit_emit_simd_replicate(compiler, type, freg, src, srcw)); in sljit_emit_simd_replicate()
3415 SLJIT_UNUSED_ARG(compiler); in sljit_emit_simd_replicate()
3424 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_lane_mov(struct sljit_compiler *compiler, sljit_… in sljit_emit_simd_lane_mov() argument
3429 CHECK(check_sljit_emit_simd_lane_mov(compiler, type, freg, lane_index, srcdst, srcdstw)); in sljit_emit_simd_lane_mov()
3430 SLJIT_UNUSED_ARG(compiler); in sljit_emit_simd_lane_mov()
3440 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_lane_replicate(struct sljit_compiler *compiler, … in sljit_emit_simd_lane_replicate() argument
3445 CHECK(check_sljit_emit_simd_lane_replicate(compiler, type, freg, src, src_lane_index)); in sljit_emit_simd_lane_replicate()
3446 SLJIT_UNUSED_ARG(compiler); in sljit_emit_simd_lane_replicate()
3455 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_extend(struct sljit_compiler *compiler, sljit_s3… in sljit_emit_simd_extend() argument
3460 CHECK(check_sljit_emit_simd_extend(compiler, type, freg, src, srcw)); in sljit_emit_simd_extend()
3461 SLJIT_UNUSED_ARG(compiler); in sljit_emit_simd_extend()
3470 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_sign(struct sljit_compiler *compiler, sljit_s32 … in sljit_emit_simd_sign() argument
3475 CHECK(check_sljit_emit_simd_sign(compiler, type, freg, dst, dstw)); in sljit_emit_simd_sign()
3476 SLJIT_UNUSED_ARG(compiler); in sljit_emit_simd_sign()
3485 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_simd_op2(struct sljit_compiler *compiler, sljit_s32 t… in sljit_emit_simd_op2() argument
3489 CHECK(check_sljit_emit_simd_op2(compiler, type, dst_freg, src1_freg, src2_freg)); in sljit_emit_simd_op2()
3490 SLJIT_UNUSED_ARG(compiler); in sljit_emit_simd_op2()
3506 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_atomic_load(struct sljit_compiler *compiler, in sljit_emit_atomic_load() argument
3511 SLJIT_UNUSED_ARG(compiler); in sljit_emit_atomic_load()
3517 CHECK(check_sljit_emit_atomic_load(compiler, op, dst_reg, mem_reg)); in sljit_emit_atomic_load()
3522 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_atomic_store(struct sljit_compiler *compiler, in sljit_emit_atomic_store() argument
3528 SLJIT_UNUSED_ARG(compiler); in sljit_emit_atomic_store()
3535 CHECK(check_sljit_emit_atomic_store(compiler, op, src_reg, mem_reg, temp_reg)); in sljit_emit_atomic_store()
3545 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 … in sljit_get_local_base() argument
3548 CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset)); in sljit_get_local_base()
3552 SLJIT_SKIP_CHECKS(compiler); in sljit_get_local_base()
3555 return sljit_emit_op2(compiler, SLJIT_ADD, dst, dstw, SLJIT_SP, 0, SLJIT_IMM, offset); in sljit_get_local_base()
3556 return sljit_emit_op1(compiler, SLJIT_MOV, dst, dstw, SLJIT_SP, 0); in sljit_get_local_base()