• Home
  • History
  • Annotate
  • Raw
  • Download

Lines Matching full:compiler

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