Lines Matching refs:compiler

184 static sljit_si push_inst(struct sljit_compiler *compiler, sljit_ins ins, sljit_si delay_slot)  in push_inst()  argument
190 ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins)); in push_inst()
193 compiler->size++; in push_inst()
194 compiler->delay_slot = delay_slot; in push_inst()
271 SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) in sljit_generate_code() argument
286 CHECK_PTR(check_sljit_generate_code(compiler)); in sljit_generate_code()
287 reverse_buf(compiler); in sljit_generate_code()
289 code = (sljit_ins*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins)); in sljit_generate_code()
291 buf = compiler->buf; in sljit_generate_code()
295 label = compiler->labels; in sljit_generate_code()
296 jump = compiler->jumps; in sljit_generate_code()
297 const_ = compiler->consts; in sljit_generate_code()
343 SLJIT_ASSERT(code_ptr - code <= (sljit_si)compiler->size); in sljit_generate_code()
345 jump = compiler->jumps; in sljit_generate_code()
376 compiler->error = SLJIT_ERR_COMPILED; in sljit_generate_code()
377 compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins); in sljit_generate_code()
421 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, in sljit_emit_enter() argument
426 …CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, loca… in sljit_emit_enter()
427 set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_emit_enter()
430 compiler->local_size = local_size; in sljit_emit_enter()
433 FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_SP) | S1(SLJIT_SP) | IMM(-local_size), UNMOVABLE_INS)); in sljit_emit_enter()
436 FAIL_IF(load_immediate(compiler, TMP_REG1, -local_size)); in sljit_emit_enter()
437 FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_SP) | S1(SLJIT_SP) | S2(TMP_REG1), UNMOVABLE_INS)); in sljit_emit_enter()
445 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
450 …CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, loc… in sljit_set_context()
451 set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_set_context()
453 compiler->local_size = (local_size + SLJIT_LOCALS_OFFSET + 7) & ~0x7; in sljit_set_context()
457 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, s… in sljit_emit_return() argument
460 CHECK(check_sljit_emit_return(compiler, op, src, srcw)); in sljit_emit_return()
463 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
467 FAIL_IF(push_inst(compiler, JMPL | D(0) | S1A(31) | IMM(8), UNMOVABLE_INS)); in sljit_emit_return()
468 return push_inst(compiler, RESTORE | D(SLJIT_R0) | S1(src) | S2(0), UNMOVABLE_INS); in sljit_emit_return()
509 static sljit_si getput_arg_fast(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, slji… in getput_arg_fast() argument
519 FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] in getput_arg_fast()
552 static sljit_si getput_arg(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_si … in getput_arg() argument
569 …if (((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg) && (argw == compiler->cache_argw)) in getput_arg()
573 compiler->cache_arg = SLJIT_MEM | (arg & OFFS_REG_MASK); in getput_arg()
574 compiler->cache_argw = argw; in getput_arg()
581 FAIL_IF(push_inst(compiler, SLL_W | D(arg2) | S1(OFFS_REG(arg)) | IMM_ARG | argw, DR(arg2))); in getput_arg()
586 …if ((compiler->cache_arg == SLJIT_MEM) && (argw - compiler->cache_argw) <= SIMM_MAX && (argw - com… in getput_arg()
587 if (argw != compiler->cache_argw) { in getput_arg()
588 …FAIL_IF(push_inst(compiler, ADD | D(TMP_REG3) | S1(TMP_REG3) | IMM(argw - compiler->cache_argw), D… in getput_arg()
589 compiler->cache_argw = argw; in getput_arg()
594 compiler->cache_arg = SLJIT_MEM; in getput_arg()
595 compiler->cache_argw = argw; in getput_arg()
602 FAIL_IF(load_immediate(compiler, arg2, argw)); in getput_arg()
609 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(arg2) | IMM(0), delay… in getput_arg()
611 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), del… in getput_arg()
612 …FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), de… in getput_arg()
613 return push_inst(compiler, ADD | D(base) | S1(base) | S2(arg2), DR(base)); in getput_arg()
616 static SLJIT_INLINE sljit_si emit_op_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si … in emit_op_mem() argument
618 if (getput_arg_fast(compiler, flags, reg, arg, argw)) in emit_op_mem()
619 return compiler->error; in emit_op_mem()
620 compiler->cache_arg = 0; in emit_op_mem()
621 compiler->cache_argw = 0; in emit_op_mem()
622 return getput_arg(compiler, flags, reg, arg, argw, 0, 0); in emit_op_mem()
625 static SLJIT_INLINE sljit_si emit_op_mem2(struct sljit_compiler *compiler, sljit_si flags, sljit_si… in emit_op_mem2() argument
627 if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) in emit_op_mem2()
628 return compiler->error; in emit_op_mem2()
629 return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); in emit_op_mem2()
632 static sljit_si emit_op(struct sljit_compiler *compiler, sljit_si op, sljit_si flags, in emit_op() argument
647 compiler->cache_arg = 0; in emit_op()
648 compiler->cache_argw = 0; in emit_op()
661 else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, TMP_REG1, dst, dstw)) in emit_op()
690 FAIL_IF(load_immediate(compiler, TMP_REG1, src1w)); in emit_op()
697 if (getput_arg_fast(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w)) in emit_op()
698 FAIL_IF(compiler->error); in emit_op()
714 FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w)); in emit_op()
725 if (getput_arg_fast(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w)) in emit_op()
726 FAIL_IF(compiler->error); in emit_op()
735 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, src1, src1w)); in emit_op()
736 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
739 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w)); in emit_op()
740 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw)); in emit_op()
744 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
746 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw)); in emit_op()
748 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
752 getput_arg_fast(compiler, flags, dst_r, dst, dstw); in emit_op()
753 return compiler->error; in emit_op()
755 return getput_arg(compiler, flags, dst_r, dst, dstw, 0, 0); in emit_op()
761 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op) in sljit_emit_op0() argument
764 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
769 return push_inst(compiler, TA, UNMOVABLE_INS); in sljit_emit_op0()
771 return push_inst(compiler, NOP, UNMOVABLE_INS); in sljit_emit_op0()
775 …FAIL_IF(push_inst(compiler, (op == SLJIT_LUMUL ? UMUL : SMUL) | D(SLJIT_R0) | S1(SLJIT_R0) | S2(SL… in sljit_emit_op0()
776 return push_inst(compiler, RDY | D(SLJIT_R1), DR(SLJIT_R1)); in sljit_emit_op0()
787 FAIL_IF(push_inst(compiler, WRY | S1(0), MOVABLE_INS)); in sljit_emit_op0()
789 FAIL_IF(push_inst(compiler, SRA | D(TMP_REG1) | S1(SLJIT_R0) | IMM(31), DR(TMP_REG1))); in sljit_emit_op0()
790 FAIL_IF(push_inst(compiler, WRY | S1(TMP_REG1), MOVABLE_INS)); in sljit_emit_op0()
793 FAIL_IF(push_inst(compiler, OR | D(TMP_REG2) | S1(0) | S2(SLJIT_R0), DR(TMP_REG2))); in sljit_emit_op0()
794 …FAIL_IF(push_inst(compiler, ((op | 0x2) == SLJIT_UDIVI ? UDIV : SDIV) | D(SLJIT_R0) | S1(SLJIT_R0)… in sljit_emit_op0()
797 FAIL_IF(push_inst(compiler, SMUL | D(SLJIT_R1) | S1(SLJIT_R0) | S2(SLJIT_R1), DR(SLJIT_R1))); in sljit_emit_op0()
798 return push_inst(compiler, SUB | D(SLJIT_R1) | S1(TMP_REG2) | S2(SLJIT_R1), DR(SLJIT_R1)); in sljit_emit_op0()
807 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op1() argument
814 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
822 return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
825 return emit_op(compiler, SLJIT_MOV_UI, flags | INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
828 …return emit_op(compiler, SLJIT_MOV_SI, flags | INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
831 …return emit_op(compiler, SLJIT_MOV_UB, flags | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJI… in sljit_emit_op1()
834 …return emit_op(compiler, SLJIT_MOV_SB, flags | BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, sr… in sljit_emit_op1()
837 …return emit_op(compiler, SLJIT_MOV_UH, flags | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJI… in sljit_emit_op1()
840 …return emit_op(compiler, SLJIT_MOV_SH, flags | HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, sr… in sljit_emit_op1()
844 …return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, s… in sljit_emit_op1()
847 …return emit_op(compiler, SLJIT_MOV_UI, flags | INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src,… in sljit_emit_op1()
850 …return emit_op(compiler, SLJIT_MOV_SI, flags | INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP… in sljit_emit_op1()
853 …return emit_op(compiler, SLJIT_MOV_UB, flags | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
856 …return emit_op(compiler, SLJIT_MOV_SB, flags | BYTE_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TM… in sljit_emit_op1()
859 …return emit_op(compiler, SLJIT_MOV_UH, flags | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
862 …return emit_op(compiler, SLJIT_MOV_SH, flags | HALF_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TM… in sljit_emit_op1()
866 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
869 return emit_op(compiler, SLJIT_SUB, flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
875 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op2() argument
883 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
896 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
900 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
911 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
929 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler, in sljit_emit_op_custom() argument
933 CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); in sljit_emit_op_custom()
935 return push_inst(compiler, *(sljit_ins*)instruction, UNMOVABLE_INS); in sljit_emit_op_custom()
956 static SLJIT_INLINE sljit_si sljit_emit_fop1_convw_fromd(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fop1_convw_fromd() argument
961 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw)); in sljit_emit_fop1_convw_fromd()
967 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSTOI, FDTOI) | DA(TMP_FREG1) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1_convw_fromd()
973 …FAIL_IF(emit_op_mem2(compiler, SINGLE_DATA, TMP_FREG1, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET,… in sljit_emit_fop1_convw_fromd()
974 …return emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, dst, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFS… in sljit_emit_fop1_convw_fromd()
978 return emit_op_mem2(compiler, SINGLE_DATA, TMP_FREG1, dst, dstw, 0, 0); in sljit_emit_fop1_convw_fromd()
981 static SLJIT_INLINE sljit_si sljit_emit_fop1_convd_fromw(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fop1_convd_fromw() argument
992 FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); in sljit_emit_fop1_convd_fromw()
998 …FAIL_IF(emit_op_mem2(compiler, WORD_DATA, src, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, SLJIT_M… in sljit_emit_fop1_convd_fromw()
1003 FAIL_IF(emit_op_mem2(compiler, SINGLE_DATA | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw)); in sljit_emit_fop1_convd_fromw()
1004 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FITOS, FITOD) | DA(dst_r) | S2A(TMP_FREG1), MOVABLE_INS… in sljit_emit_fop1_convd_fromw()
1007 return emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, 0, 0); in sljit_emit_fop1_convd_fromw()
1011 static SLJIT_INLINE sljit_si sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1_cmp() argument
1016 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w)); in sljit_emit_fop1_cmp()
1023 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, 0, 0)); in sljit_emit_fop1_cmp()
1029 …return push_inst(compiler, SELECT_FOP(op, FCMPS, FCMPD) | S1A(src1) | S2A(src2), FCC_IS_SET | MOVA… in sljit_emit_fop1_cmp()
1032 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1() argument
1039 compiler->cache_arg = 0; in sljit_emit_fop1()
1040 compiler->cache_argw = 0; in sljit_emit_fop1()
1043 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1051 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, dst, dstw)); in sljit_emit_fop1()
1061 FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1063 FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r | 1) | S2A(src | 1), MOVABLE_INS)); in sljit_emit_fop1()
1070 FAIL_IF(push_inst(compiler, FNEGS | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1072 FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r | 1) | S2A(src | 1), MOVABLE_INS)); in sljit_emit_fop1()
1075 FAIL_IF(push_inst(compiler, FABSS | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1077 FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r | 1) | S2A(src | 1), MOVABLE_INS)); in sljit_emit_fop1()
1080 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSTOD, FDTOS) | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1086 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), dst_r, dst, dstw, 0, 0)); in sljit_emit_fop1()
1090 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop2() argument
1098 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1103 compiler->cache_arg = 0; in sljit_emit_fop2()
1104 compiler->cache_argw = 0; in sljit_emit_fop2()
1109 if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w)) { in sljit_emit_fop2()
1110 FAIL_IF(compiler->error); in sljit_emit_fop2()
1119 if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w)) { in sljit_emit_fop2()
1120 FAIL_IF(compiler->error); in sljit_emit_fop2()
1130 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, src1, src1w)); in sljit_emit_fop2()
1131 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
1134 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1135 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
1139 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
1141 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
1150 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FADDS, FADDD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1154 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSUBS, FSUBD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1158 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FMULS, FMULD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1162 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FDIVS, FDIVD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1167 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0)); in sljit_emit_fop2()
1179 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si d… in sljit_emit_fast_enter() argument
1182 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1190 return push_inst(compiler, OR | D(dst) | S1(0) | S2(TMP_LINK), DR(dst)); in sljit_emit_fast_enter()
1193 return emit_op_mem(compiler, WORD_DATA, TMP_LINK, dst, dstw); in sljit_emit_fast_enter()
1196 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fast_return() argument
1199 CHECK(check_sljit_emit_fast_return(compiler, src, srcw)); in sljit_emit_fast_return()
1203 FAIL_IF(push_inst(compiler, OR | D(TMP_LINK) | S1(0) | S2(src), DR(TMP_LINK))); in sljit_emit_fast_return()
1205 FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_LINK, src, srcw)); in sljit_emit_fast_return()
1207 FAIL_IF(load_immediate(compiler, TMP_LINK, srcw)); in sljit_emit_fast_return()
1209 FAIL_IF(push_inst(compiler, JMPL | D(0) | S1(TMP_LINK) | IMM(8), UNMOVABLE_INS)); in sljit_emit_fast_return()
1210 return push_inst(compiler, NOP, UNMOVABLE_INS); in sljit_emit_fast_return()
1217 SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) in sljit_emit_label() argument
1222 CHECK_PTR(check_sljit_emit_label(compiler)); in sljit_emit_label()
1224 if (compiler->last_label && compiler->last_label->size == compiler->size) in sljit_emit_label()
1225 return compiler->last_label; in sljit_emit_label()
1227 label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label)); in sljit_emit_label()
1229 set_label(label, compiler); in sljit_emit_label()
1230 compiler->delay_slot = UNMOVABLE_INS; in sljit_emit_label()
1289 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in sljit_emit_jump() argument
1294 CHECK_PTR(check_sljit_emit_jump(compiler, type)); in sljit_emit_jump()
1296 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
1298 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
1303 …if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & ICC_IS_SE… in sljit_emit_jump()
1306 PTR_FAIL_IF(push_inst(compiler, BICC | get_cc(type ^ 1) | 5, UNMOVABLE_INS)); in sljit_emit_jump()
1313 …if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & FCC_IS_SE… in sljit_emit_jump()
1316 PTR_FAIL_IF(push_inst(compiler, FBFCC | get_cc(type ^ 1) | 5, UNMOVABLE_INS)); in sljit_emit_jump()
1321 if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) in sljit_emit_jump()
1327 PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0)); in sljit_emit_jump()
1328 …PTR_FAIL_IF(push_inst(compiler, JMPL | D(type >= SLJIT_FAST_CALL ? TMP_LINK : 0) | S1(TMP_REG2) | … in sljit_emit_jump()
1329 jump->addr = compiler->size; in sljit_emit_jump()
1330 PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS)); in sljit_emit_jump()
1335 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, … in sljit_emit_ijump() argument
1341 CHECK(check_sljit_emit_ijump(compiler, type, src, srcw)); in sljit_emit_ijump()
1347 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
1349 set_jump(jump, compiler, JUMP_ADDR); in sljit_emit_ijump()
1351 if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) in sljit_emit_ijump()
1356 FAIL_IF(emit_const(compiler, TMP_REG2, 0)); in sljit_emit_ijump()
1360 FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw)); in sljit_emit_ijump()
1364 …FAIL_IF(push_inst(compiler, JMPL | D(type >= SLJIT_FAST_CALL ? TMP_LINK : 0) | S1(src_r) | IMM(0),… in sljit_emit_ijump()
1366 jump->addr = compiler->size; in sljit_emit_ijump()
1367 return push_inst(compiler, NOP, UNMOVABLE_INS); in sljit_emit_ijump()
1370 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op_flags() argument
1378 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type)); in sljit_emit_op_flags()
1388 compiler->cache_arg = 0; in sljit_emit_op_flags()
1389 compiler->cache_argw = 0; in sljit_emit_op_flags()
1392 FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw)); in sljit_emit_op_flags()
1399 FAIL_IF(push_inst(compiler, BICC | get_cc(type) | 3, UNMOVABLE_INS)); in sljit_emit_op_flags()
1401 FAIL_IF(push_inst(compiler, FBFCC | get_cc(type) | 3, UNMOVABLE_INS)); in sljit_emit_op_flags()
1403 FAIL_IF(push_inst(compiler, OR | D(reg) | S1(0) | IMM(1), UNMOVABLE_INS)); in sljit_emit_op_flags()
1404 FAIL_IF(push_inst(compiler, OR | D(reg) | S1(0) | IMM(0), UNMOVABLE_INS)); in sljit_emit_op_flags()
1407 …return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw… in sljit_emit_op_flags()
1409 return (reg == TMP_REG2) ? emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw) : SLJIT_SUCCESS; in sljit_emit_op_flags()
1415 SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, slji… in sljit_emit_const() argument
1421 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
1424 const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const)); in sljit_emit_const()
1426 set_const(const_, compiler); in sljit_emit_const()
1430 PTR_FAIL_IF(emit_const(compiler, reg, init_value)); in sljit_emit_const()
1433 PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw)); in sljit_emit_const()