Lines Matching refs:compiler
190 static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins, sljit_s32 delay_slot) in push_inst() argument
196 ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins)); in push_inst()
199 compiler->size++; in push_inst()
200 compiler->delay_slot = delay_slot; in push_inst()
279 SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) in sljit_generate_code() argument
295 CHECK_PTR(check_sljit_generate_code(compiler)); in sljit_generate_code()
296 reverse_buf(compiler); in sljit_generate_code()
298 code = (sljit_ins*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins)); in sljit_generate_code()
300 buf = compiler->buf; in sljit_generate_code()
306 label = compiler->labels; in sljit_generate_code()
307 jump = compiler->jumps; in sljit_generate_code()
308 const_ = compiler->consts; in sljit_generate_code()
355 SLJIT_ASSERT(code_ptr - code <= (sljit_s32)compiler->size); in sljit_generate_code()
357 jump = compiler->jumps; in sljit_generate_code()
388 compiler->error = SLJIT_ERR_COMPILED; in sljit_generate_code()
389 compiler->executable_offset = executable_offset; in sljit_generate_code()
390 compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins); in sljit_generate_code()
438 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler, in sljit_emit_enter() argument
443 …CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, loca… in sljit_emit_enter()
444 set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_emit_enter()
447 compiler->local_size = local_size; in sljit_emit_enter()
450 FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_SP) | S1(SLJIT_SP) | IMM(-local_size), UNMOVABLE_INS)); in sljit_emit_enter()
453 FAIL_IF(load_immediate(compiler, TMP_REG1, -local_size)); in sljit_emit_enter()
454 FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_SP) | S1(SLJIT_SP) | S2(TMP_REG1), UNMOVABLE_INS)); in sljit_emit_enter()
462 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
467 …CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, loc… in sljit_set_context()
468 set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_set_context()
470 compiler->local_size = (local_size + SLJIT_LOCALS_OFFSET + 7) & ~0x7; in sljit_set_context()
474 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op,… in sljit_emit_return() argument
477 CHECK(check_sljit_emit_return(compiler, op, src, srcw)); in sljit_emit_return()
480 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
484 FAIL_IF(push_inst(compiler, JMPL | D(0) | S1A(31) | IMM(8), UNMOVABLE_INS)); in sljit_emit_return()
485 return push_inst(compiler, RESTORE | D(SLJIT_R0) | S1(src) | S2(0), UNMOVABLE_INS); in sljit_emit_return()
526 static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, s… in getput_arg_fast() argument
536 FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] in getput_arg_fast()
569 static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_… in getput_arg() argument
585 …if (((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg) && (argw == compiler->cache_argw)) in getput_arg()
589 compiler->cache_arg = SLJIT_MEM | (arg & OFFS_REG_MASK); in getput_arg()
590 compiler->cache_argw = argw; in getput_arg()
597 FAIL_IF(push_inst(compiler, SLL_W | D(arg2) | S1(OFFS_REG(arg)) | IMM_ARG | argw, DR(arg2))); in getput_arg()
602 …if ((compiler->cache_arg == SLJIT_MEM) && (argw - compiler->cache_argw) <= SIMM_MAX && (argw - com… in getput_arg()
603 if (argw != compiler->cache_argw) { in getput_arg()
604 …FAIL_IF(push_inst(compiler, ADD | D(TMP_REG3) | S1(TMP_REG3) | IMM(argw - compiler->cache_argw), D… in getput_arg()
605 compiler->cache_argw = argw; in getput_arg()
610 compiler->cache_arg = SLJIT_MEM; in getput_arg()
611 compiler->cache_argw = argw; in getput_arg()
618 FAIL_IF(load_immediate(compiler, arg2, argw)); in getput_arg()
625 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(arg2) | IMM(0), delay… in getput_arg()
627 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), del… in getput_arg()
628 …FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), de… in getput_arg()
629 return push_inst(compiler, ADD | D(base) | S1(base) | S2(arg2), DR(base)); in getput_arg()
632 static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s… in emit_op_mem() argument
634 if (getput_arg_fast(compiler, flags, reg, arg, argw)) in emit_op_mem()
635 return compiler->error; in emit_op_mem()
636 compiler->cache_arg = 0; in emit_op_mem()
637 compiler->cache_argw = 0; in emit_op_mem()
638 return getput_arg(compiler, flags, reg, arg, argw, 0, 0); in emit_op_mem()
641 static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_… in emit_op_mem2() argument
643 if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) in emit_op_mem2()
644 return compiler->error; in emit_op_mem2()
645 return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); in emit_op_mem2()
648 static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, in emit_op() argument
663 compiler->cache_arg = 0; in emit_op()
664 compiler->cache_argw = 0; in emit_op()
677 else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, TMP_REG1, dst, dstw)) in emit_op()
706 FAIL_IF(load_immediate(compiler, TMP_REG1, src1w)); in emit_op()
713 if (getput_arg_fast(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w)) in emit_op()
714 FAIL_IF(compiler->error); in emit_op()
730 FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w)); in emit_op()
741 if (getput_arg_fast(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w)) in emit_op()
742 FAIL_IF(compiler->error); in emit_op()
751 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, src1, src1w)); in emit_op()
752 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
755 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w)); in emit_op()
756 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw)); in emit_op()
760 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
762 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw)); in emit_op()
764 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
768 getput_arg_fast(compiler, flags, dst_r, dst, dstw); in emit_op()
769 return compiler->error; in emit_op()
771 return getput_arg(compiler, flags, dst_r, dst, dstw, 0, 0); in emit_op()
777 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in sljit_emit_op0() argument
780 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
785 return push_inst(compiler, TA, UNMOVABLE_INS); in sljit_emit_op0()
787 return push_inst(compiler, NOP, UNMOVABLE_INS); in sljit_emit_op0()
791 …FAIL_IF(push_inst(compiler, (op == SLJIT_LMUL_UW ? UMUL : SMUL) | D(SLJIT_R0) | S1(SLJIT_R0) | S2(… in sljit_emit_op0()
792 return push_inst(compiler, RDY | D(SLJIT_R1), DR(SLJIT_R1)); in sljit_emit_op0()
803 FAIL_IF(push_inst(compiler, WRY | S1(0), MOVABLE_INS)); in sljit_emit_op0()
805 FAIL_IF(push_inst(compiler, SRA | D(TMP_REG1) | S1(SLJIT_R0) | IMM(31), DR(TMP_REG1))); in sljit_emit_op0()
806 FAIL_IF(push_inst(compiler, WRY | S1(TMP_REG1), MOVABLE_INS)); in sljit_emit_op0()
809 FAIL_IF(push_inst(compiler, OR | D(TMP_REG2) | S1(0) | S2(SLJIT_R0), DR(TMP_REG2))); in sljit_emit_op0()
810 …FAIL_IF(push_inst(compiler, ((op | 0x2) == SLJIT_DIV_UW ? UDIV : SDIV) | D(SLJIT_R0) | S1(SLJIT_R0… in sljit_emit_op0()
813 FAIL_IF(push_inst(compiler, SMUL | D(SLJIT_R1) | S1(SLJIT_R0) | S2(SLJIT_R1), DR(SLJIT_R1))); in sljit_emit_op0()
814 return push_inst(compiler, SUB | D(SLJIT_R1) | S1(TMP_REG2) | S2(SLJIT_R1), DR(SLJIT_R1)); in sljit_emit_op0()
823 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op1() argument
830 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
838 return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
841 return emit_op(compiler, SLJIT_MOV_U32, flags | INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
844 …return emit_op(compiler, SLJIT_MOV_S32, flags | INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, sr… in sljit_emit_op1()
847 …return emit_op(compiler, SLJIT_MOV_U8, flags | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJI… in sljit_emit_op1()
850 …return emit_op(compiler, SLJIT_MOV_S8, flags | BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, sr… in sljit_emit_op1()
853 …return emit_op(compiler, SLJIT_MOV_U16, flags | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJ… in sljit_emit_op1()
856 …return emit_op(compiler, SLJIT_MOV_S16, flags | HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, s… in sljit_emit_op1()
860 …return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, s… in sljit_emit_op1()
863 …return emit_op(compiler, SLJIT_MOV_U32, flags | INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
866 …return emit_op(compiler, SLJIT_MOV_S32, flags | INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TM… in sljit_emit_op1()
869 …return emit_op(compiler, SLJIT_MOV_U8, flags | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
872 …return emit_op(compiler, SLJIT_MOV_S8, flags | BYTE_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TM… in sljit_emit_op1()
875 …return emit_op(compiler, SLJIT_MOV_U16, flags | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, sr… in sljit_emit_op1()
878 …return emit_op(compiler, SLJIT_MOV_S16, flags | HALF_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, T… in sljit_emit_op1()
882 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
885 return emit_op(compiler, SLJIT_SUB, flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
891 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2() argument
899 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
912 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
916 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
927 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
945 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, in sljit_emit_op_custom() argument
949 CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); in sljit_emit_op_custom()
951 return push_inst(compiler, *(sljit_ins*)instruction, UNMOVABLE_INS); in sljit_emit_op_custom()
972 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, slj… in sljit_emit_fop1_conv_sw_from_f64() argument
977 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw)); in sljit_emit_fop1_conv_sw_from_f64()
983 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSTOI, FDTOI) | DA(TMP_FREG1) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1_conv_sw_from_f64()
989 …FAIL_IF(emit_op_mem2(compiler, SINGLE_DATA, TMP_FREG1, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET,… in sljit_emit_fop1_conv_sw_from_f64()
990 …return emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, dst, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFS… in sljit_emit_fop1_conv_sw_from_f64()
994 return emit_op_mem2(compiler, SINGLE_DATA, TMP_FREG1, dst, dstw, 0, 0); in sljit_emit_fop1_conv_sw_from_f64()
997 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, slj… in sljit_emit_fop1_conv_f64_from_sw() argument
1008 FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); in sljit_emit_fop1_conv_f64_from_sw()
1014 …FAIL_IF(emit_op_mem2(compiler, WORD_DATA, src, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, SLJIT_M… in sljit_emit_fop1_conv_f64_from_sw()
1019 FAIL_IF(emit_op_mem2(compiler, SINGLE_DATA | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw)); in sljit_emit_fop1_conv_f64_from_sw()
1020 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FITOS, FITOD) | DA(dst_r) | S2A(TMP_FREG1), MOVABLE_INS… in sljit_emit_fop1_conv_f64_from_sw()
1023 return emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, 0, 0); in sljit_emit_fop1_conv_f64_from_sw()
1027 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1_cmp() argument
1032 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w)); in sljit_emit_fop1_cmp()
1039 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, 0, 0)); in sljit_emit_fop1_cmp()
1045 …return push_inst(compiler, SELECT_FOP(op, FCMPS, FCMPD) | S1A(src1) | S2A(src2), FCC_IS_SET | MOVA… in sljit_emit_fop1_cmp()
1048 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1() argument
1055 compiler->cache_arg = 0; in sljit_emit_fop1()
1056 compiler->cache_argw = 0; in sljit_emit_fop1()
1059 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1067 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, dst, dstw)); in sljit_emit_fop1()
1077 FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1079 FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r | 1) | S2A(src | 1), MOVABLE_INS)); in sljit_emit_fop1()
1086 FAIL_IF(push_inst(compiler, FNEGS | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1088 FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r | 1) | S2A(src | 1), MOVABLE_INS)); in sljit_emit_fop1()
1091 FAIL_IF(push_inst(compiler, FABSS | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1093 FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r | 1) | S2A(src | 1), MOVABLE_INS)); in sljit_emit_fop1()
1096 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSTOD, FDTOS) | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1102 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), dst_r, dst, dstw, 0, 0)); in sljit_emit_fop1()
1106 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop2() argument
1114 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1119 compiler->cache_arg = 0; in sljit_emit_fop2()
1120 compiler->cache_argw = 0; in sljit_emit_fop2()
1125 if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w)) { in sljit_emit_fop2()
1126 FAIL_IF(compiler->error); in sljit_emit_fop2()
1135 if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w)) { in sljit_emit_fop2()
1136 FAIL_IF(compiler->error); in sljit_emit_fop2()
1146 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, src1, src1w)); in sljit_emit_fop2()
1147 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
1150 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1151 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
1155 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
1157 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
1166 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FADDS, FADDD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1170 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSUBS, FSUBD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1174 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FMULS, FMULD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1178 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FDIVS, FDIVD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1183 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0)); in sljit_emit_fop2()
1195 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32… in sljit_emit_fast_enter() argument
1198 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1206 return push_inst(compiler, OR | D(dst) | S1(0) | S2(TMP_LINK), DR(dst)); in sljit_emit_fast_enter()
1209 return emit_op_mem(compiler, WORD_DATA, TMP_LINK, dst, dstw); in sljit_emit_fast_enter()
1212 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s3… in sljit_emit_fast_return() argument
1215 CHECK(check_sljit_emit_fast_return(compiler, src, srcw)); in sljit_emit_fast_return()
1219 FAIL_IF(push_inst(compiler, OR | D(TMP_LINK) | S1(0) | S2(src), DR(TMP_LINK))); in sljit_emit_fast_return()
1221 FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_LINK, src, srcw)); in sljit_emit_fast_return()
1223 FAIL_IF(load_immediate(compiler, TMP_LINK, srcw)); in sljit_emit_fast_return()
1225 FAIL_IF(push_inst(compiler, JMPL | D(0) | S1(TMP_LINK) | IMM(8), UNMOVABLE_INS)); in sljit_emit_fast_return()
1226 return push_inst(compiler, NOP, UNMOVABLE_INS); in sljit_emit_fast_return()
1233 SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) in sljit_emit_label() argument
1238 CHECK_PTR(check_sljit_emit_label(compiler)); in sljit_emit_label()
1240 if (compiler->last_label && compiler->last_label->size == compiler->size) in sljit_emit_label()
1241 return compiler->last_label; in sljit_emit_label()
1243 label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label)); in sljit_emit_label()
1245 set_label(label, compiler); in sljit_emit_label()
1246 compiler->delay_slot = UNMOVABLE_INS; in sljit_emit_label()
1305 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in sljit_emit_jump() argument
1310 CHECK_PTR(check_sljit_emit_jump(compiler, type)); in sljit_emit_jump()
1312 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
1314 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
1319 …if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & ICC_IS_SE… in sljit_emit_jump()
1322 PTR_FAIL_IF(push_inst(compiler, BICC | get_cc(type ^ 1) | 5, UNMOVABLE_INS)); in sljit_emit_jump()
1329 …if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & FCC_IS_SE… in sljit_emit_jump()
1332 PTR_FAIL_IF(push_inst(compiler, FBFCC | get_cc(type ^ 1) | 5, UNMOVABLE_INS)); in sljit_emit_jump()
1337 if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) in sljit_emit_jump()
1343 PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0)); in sljit_emit_jump()
1344 …PTR_FAIL_IF(push_inst(compiler, JMPL | D(type >= SLJIT_FAST_CALL ? TMP_LINK : 0) | S1(TMP_REG2) | … in sljit_emit_jump()
1345 jump->addr = compiler->size; in sljit_emit_jump()
1346 PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS)); in sljit_emit_jump()
1351 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type… in sljit_emit_ijump() argument
1357 CHECK(check_sljit_emit_ijump(compiler, type, src, srcw)); in sljit_emit_ijump()
1363 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
1365 set_jump(jump, compiler, JUMP_ADDR); in sljit_emit_ijump()
1367 if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) in sljit_emit_ijump()
1372 FAIL_IF(emit_const(compiler, TMP_REG2, 0)); in sljit_emit_ijump()
1376 FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw)); in sljit_emit_ijump()
1380 …FAIL_IF(push_inst(compiler, JMPL | D(type >= SLJIT_FAST_CALL ? TMP_LINK : 0) | S1(src_r) | IMM(0),… in sljit_emit_ijump()
1382 jump->addr = compiler->size; in sljit_emit_ijump()
1383 return push_inst(compiler, NOP, UNMOVABLE_INS); in sljit_emit_ijump()
1386 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 o… in sljit_emit_op_flags() argument
1394 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type)); in sljit_emit_op_flags()
1404 compiler->cache_arg = 0; in sljit_emit_op_flags()
1405 compiler->cache_argw = 0; in sljit_emit_op_flags()
1408 FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw)); in sljit_emit_op_flags()
1415 FAIL_IF(push_inst(compiler, BICC | get_cc(type) | 3, UNMOVABLE_INS)); in sljit_emit_op_flags()
1417 FAIL_IF(push_inst(compiler, FBFCC | get_cc(type) | 3, UNMOVABLE_INS)); in sljit_emit_op_flags()
1419 FAIL_IF(push_inst(compiler, OR | D(reg) | S1(0) | IMM(1), UNMOVABLE_INS)); in sljit_emit_op_flags()
1420 FAIL_IF(push_inst(compiler, OR | D(reg) | S1(0) | IMM(0), UNMOVABLE_INS)); in sljit_emit_op_flags()
1423 …return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw… in sljit_emit_op_flags()
1425 return (reg == TMP_REG2) ? emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw) : SLJIT_SUCCESS; in sljit_emit_op_flags()
1431 SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, slji… in sljit_emit_const() argument
1437 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
1440 const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const)); in sljit_emit_const()
1442 set_const(const_, compiler); in sljit_emit_const()
1446 PTR_FAIL_IF(emit_const(compiler, reg, init_value)); in sljit_emit_const()
1449 PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw)); in sljit_emit_const()