• Home
  • Raw
  • Download

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_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_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size… in sljit_emit_enter()
428 compiler->options = options; in sljit_emit_enter()
429 compiler->scratches = scratches; in sljit_emit_enter()
430 compiler->saveds = saveds; in sljit_emit_enter()
431 compiler->fscratches = fscratches; in sljit_emit_enter()
432 compiler->fsaveds = fsaveds; in sljit_emit_enter()
434 compiler->logical_local_size = local_size; in sljit_emit_enter()
438 compiler->local_size = local_size; in sljit_emit_enter()
441 FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_SP) | S1(SLJIT_SP) | IMM(-local_size), UNMOVABLE_INS)); in sljit_emit_enter()
444 FAIL_IF(load_immediate(compiler, TMP_REG1, -local_size)); in sljit_emit_enter()
445 FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_SP) | S1(SLJIT_SP) | S2(TMP_REG1), UNMOVABLE_INS)); in sljit_emit_enter()
453 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
458 …check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_siz… in sljit_set_context()
460 compiler->options = options; in sljit_set_context()
461 compiler->scratches = scratches; in sljit_set_context()
462 compiler->saveds = saveds; in sljit_set_context()
463 compiler->fscratches = fscratches; in sljit_set_context()
464 compiler->fsaveds = fsaveds; in sljit_set_context()
466 compiler->logical_local_size = local_size; in sljit_set_context()
469 compiler->local_size = (local_size + FIXED_LOCALS_OFFSET + 7) & ~0x7; in sljit_set_context()
472 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, s… in sljit_emit_return() argument
475 check_sljit_emit_return(compiler, op, src, srcw); in sljit_emit_return()
478 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
482 FAIL_IF(push_inst(compiler, JMPL | D(0) | S1A(31) | IMM(8), UNMOVABLE_INS)); in sljit_emit_return()
483 return push_inst(compiler, RESTORE | D(SLJIT_R0) | S1(src) | S2(0), UNMOVABLE_INS); in sljit_emit_return()
524 static sljit_si getput_arg_fast(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, slji… in getput_arg_fast() argument
534 FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] in getput_arg_fast()
567 static sljit_si getput_arg(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_si … in getput_arg() argument
584 …if (((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg) && (argw == compiler->cache_argw)) in getput_arg()
588 compiler->cache_arg = SLJIT_MEM | (arg & OFFS_REG_MASK); in getput_arg()
589 compiler->cache_argw = argw; in getput_arg()
596 FAIL_IF(push_inst(compiler, SLL_W | D(arg2) | S1(OFFS_REG(arg)) | IMM_ARG | argw, DR(arg2))); in getput_arg()
601 …if ((compiler->cache_arg == SLJIT_MEM) && (argw - compiler->cache_argw) <= SIMM_MAX && (argw - com… in getput_arg()
602 if (argw != compiler->cache_argw) { in getput_arg()
603 …FAIL_IF(push_inst(compiler, ADD | D(TMP_REG3) | S1(TMP_REG3) | IMM(argw - compiler->cache_argw), D… in getput_arg()
604 compiler->cache_argw = argw; in getput_arg()
609 compiler->cache_arg = SLJIT_MEM; in getput_arg()
610 compiler->cache_argw = argw; in getput_arg()
617 FAIL_IF(load_immediate(compiler, arg2, argw)); in getput_arg()
624 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(arg2) | IMM(0), delay… in getput_arg()
626 …return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), del… in getput_arg()
627 …FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), de… in getput_arg()
628 return push_inst(compiler, ADD | D(base) | S1(base) | S2(arg2), DR(base)); in getput_arg()
631 static SLJIT_INLINE sljit_si emit_op_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si … in emit_op_mem() argument
633 if (getput_arg_fast(compiler, flags, reg, arg, argw)) in emit_op_mem()
634 return compiler->error; in emit_op_mem()
635 compiler->cache_arg = 0; in emit_op_mem()
636 compiler->cache_argw = 0; in emit_op_mem()
637 return getput_arg(compiler, flags, reg, arg, argw, 0, 0); in emit_op_mem()
640 static SLJIT_INLINE sljit_si emit_op_mem2(struct sljit_compiler *compiler, sljit_si flags, sljit_si… in emit_op_mem2() argument
642 if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) in emit_op_mem2()
643 return compiler->error; in emit_op_mem2()
644 return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); in emit_op_mem2()
647 static sljit_si emit_op(struct sljit_compiler *compiler, sljit_si op, sljit_si flags, in emit_op() argument
662 compiler->cache_arg = 0; in emit_op()
663 compiler->cache_argw = 0; in emit_op()
676 else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, TMP_REG1, dst, dstw)) in emit_op()
705 FAIL_IF(load_immediate(compiler, TMP_REG1, src1w)); in emit_op()
712 if (getput_arg_fast(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w)) in emit_op()
713 FAIL_IF(compiler->error); in emit_op()
729 FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w)); in emit_op()
740 if (getput_arg_fast(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w)) in emit_op()
741 FAIL_IF(compiler->error); in emit_op()
750 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, src1, src1w)); in emit_op()
751 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
754 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w)); in emit_op()
755 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw)); in emit_op()
759 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
761 FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw)); in emit_op()
763 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
767 getput_arg_fast(compiler, flags, dst_r, dst, dstw); in emit_op()
768 return compiler->error; in emit_op()
770 return getput_arg(compiler, flags, dst_r, dst, dstw, 0, 0); in emit_op()
776 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op) in sljit_emit_op0() argument
779 check_sljit_emit_op0(compiler, op); in sljit_emit_op0()
784 return push_inst(compiler, TA, UNMOVABLE_INS); in sljit_emit_op0()
786 return push_inst(compiler, NOP, UNMOVABLE_INS); in sljit_emit_op0()
790 …FAIL_IF(push_inst(compiler, (op == SLJIT_UMUL ? UMUL : SMUL) | D(SLJIT_R0) | S1(SLJIT_R0) | S2(SLJ… in sljit_emit_op0()
791 return push_inst(compiler, RDY | D(SLJIT_R1), DR(SLJIT_R1)); in sljit_emit_op0()
799 FAIL_IF(push_inst(compiler, WRY | S1(0), MOVABLE_INS)); in sljit_emit_op0()
801 FAIL_IF(push_inst(compiler, SRA | D(TMP_REG1) | S1(SLJIT_R0) | IMM(31), DR(TMP_REG1))); in sljit_emit_op0()
802 FAIL_IF(push_inst(compiler, WRY | S1(TMP_REG1), MOVABLE_INS)); in sljit_emit_op0()
804 FAIL_IF(push_inst(compiler, OR | D(TMP_REG2) | S1(0) | S2(SLJIT_R0), DR(TMP_REG2))); in sljit_emit_op0()
805 …FAIL_IF(push_inst(compiler, (op == SLJIT_UDIV ? UDIV : SDIV) | D(SLJIT_R0) | S1(SLJIT_R0) | S2(SLJ… in sljit_emit_op0()
806 FAIL_IF(push_inst(compiler, SMUL | D(SLJIT_R1) | S1(SLJIT_R0) | S2(SLJIT_R1), DR(SLJIT_R1))); in sljit_emit_op0()
807 FAIL_IF(push_inst(compiler, SUB | D(SLJIT_R1) | S1(TMP_REG2) | S2(SLJIT_R1), DR(SLJIT_R1))); in sljit_emit_op0()
817 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op1() argument
824 check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw); in sljit_emit_op1()
832 return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
835 return emit_op(compiler, SLJIT_MOV_UI, flags | INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
838 …return emit_op(compiler, SLJIT_MOV_SI, flags | INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
841 …return emit_op(compiler, SLJIT_MOV_UB, flags | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJI… in sljit_emit_op1()
844 …return emit_op(compiler, SLJIT_MOV_SB, flags | BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, sr… in sljit_emit_op1()
847 …return emit_op(compiler, SLJIT_MOV_UH, flags | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJI… in sljit_emit_op1()
850 …return emit_op(compiler, SLJIT_MOV_SH, flags | HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, sr… in sljit_emit_op1()
854 …return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, s… in sljit_emit_op1()
857 …return emit_op(compiler, SLJIT_MOV_UI, flags | INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src,… in sljit_emit_op1()
860 …return emit_op(compiler, SLJIT_MOV_SI, flags | INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP… in sljit_emit_op1()
863 …return emit_op(compiler, SLJIT_MOV_UB, flags | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
866 …return emit_op(compiler, SLJIT_MOV_SB, flags | BYTE_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TM… in sljit_emit_op1()
869 …return emit_op(compiler, SLJIT_MOV_UH, flags | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src… in sljit_emit_op1()
872 …return emit_op(compiler, SLJIT_MOV_SH, flags | HALF_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TM… in sljit_emit_op1()
876 return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
879 return emit_op(compiler, SLJIT_SUB, flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
885 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op2() argument
893 check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
906 return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
910 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
921 return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
939 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler, in sljit_emit_op_custom() argument
943 check_sljit_emit_op_custom(compiler, instruction, size); in sljit_emit_op_custom()
946 return push_inst(compiler, *(sljit_ins*)instruction, UNMOVABLE_INS); in sljit_emit_op_custom()
967 static SLJIT_INLINE sljit_si sljit_emit_fop1_convw_fromd(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fop1_convw_fromd() argument
972 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw)); in sljit_emit_fop1_convw_fromd()
978 FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSTOI, FDTOI) | DA(TMP_FREG1) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1_convw_fromd()
984 …FAIL_IF(emit_op_mem2(compiler, SINGLE_DATA, TMP_FREG1, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET,… in sljit_emit_fop1_convw_fromd()
985 …return emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, dst, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFS… in sljit_emit_fop1_convw_fromd()
989 return emit_op_mem2(compiler, SINGLE_DATA, TMP_FREG1, dst, dstw, 0, 0); in sljit_emit_fop1_convw_fromd()
992 static SLJIT_INLINE sljit_si sljit_emit_fop1_convd_fromw(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fop1_convd_fromw() argument
1003 FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); in sljit_emit_fop1_convd_fromw()
1009 …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()
1014 FAIL_IF(emit_op_mem2(compiler, SINGLE_DATA | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw)); in sljit_emit_fop1_convd_fromw()
1015 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FITOS, FITOD) | DA(dst_r) | S2A(TMP_FREG1), MOVABLE_INS… in sljit_emit_fop1_convd_fromw()
1018 return emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, 0, 0); in sljit_emit_fop1_convd_fromw()
1022 static SLJIT_INLINE sljit_si sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1_cmp() argument
1027 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w)); in sljit_emit_fop1_cmp()
1034 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, 0, 0)); in sljit_emit_fop1_cmp()
1040 …return push_inst(compiler, SELECT_FOP(op, FCMPS, FCMPD) | S1A(src1) | S2A(src2), FCC_IS_SET | MOVA… in sljit_emit_fop1_cmp()
1043 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1() argument
1050 compiler->cache_arg = 0; in sljit_emit_fop1()
1051 compiler->cache_argw = 0; in sljit_emit_fop1()
1054 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1062 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, dst, dstw)); in sljit_emit_fop1()
1072 FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1074 FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r | 1) | S2A(src | 1), MOVABLE_INS)); in sljit_emit_fop1()
1081 FAIL_IF(push_inst(compiler, FNEGS | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1083 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, FABSS | 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, SELECT_FOP(op, FSTOD, FDTOS) | DA(dst_r) | S2A(src), MOVABLE_INS)); in sljit_emit_fop1()
1097 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), dst_r, dst, dstw, 0, 0)); in sljit_emit_fop1()
1101 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop2() argument
1109 check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_fop2()
1114 compiler->cache_arg = 0; in sljit_emit_fop2()
1115 compiler->cache_argw = 0; in sljit_emit_fop2()
1120 if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w)) { in sljit_emit_fop2()
1121 FAIL_IF(compiler->error); in sljit_emit_fop2()
1130 if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w)) { in sljit_emit_fop2()
1131 FAIL_IF(compiler->error); in sljit_emit_fop2()
1141 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, src1, src1w)); in sljit_emit_fop2()
1142 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
1145 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1146 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
1150 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw)); in sljit_emit_fop2()
1152 FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw)); in sljit_emit_fop2()
1161 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FADDS, FADDD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1165 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSUBS, FSUBD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1169 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FMULS, FMULD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1173 …FAIL_IF(push_inst(compiler, SELECT_FOP(op, FDIVS, FDIVD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVA… in sljit_emit_fop2()
1178 FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0)); in sljit_emit_fop2()
1190 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si d… in sljit_emit_fast_enter() argument
1193 check_sljit_emit_fast_enter(compiler, dst, dstw); in sljit_emit_fast_enter()
1201 return push_inst(compiler, OR | D(dst) | S1(0) | S2(TMP_LINK), DR(dst)); in sljit_emit_fast_enter()
1204 return emit_op_mem(compiler, WORD_DATA, TMP_LINK, dst, dstw); in sljit_emit_fast_enter()
1207 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fast_return() argument
1210 check_sljit_emit_fast_return(compiler, src, srcw); in sljit_emit_fast_return()
1214 FAIL_IF(push_inst(compiler, OR | D(TMP_LINK) | S1(0) | S2(src), DR(TMP_LINK))); in sljit_emit_fast_return()
1216 FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_LINK, src, srcw)); in sljit_emit_fast_return()
1218 FAIL_IF(load_immediate(compiler, TMP_LINK, srcw)); in sljit_emit_fast_return()
1220 FAIL_IF(push_inst(compiler, JMPL | D(0) | S1(TMP_LINK) | IMM(8), UNMOVABLE_INS)); in sljit_emit_fast_return()
1221 return push_inst(compiler, NOP, UNMOVABLE_INS); in sljit_emit_fast_return()
1228 SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) in sljit_emit_label() argument
1233 check_sljit_emit_label(compiler); in sljit_emit_label()
1235 if (compiler->last_label && compiler->last_label->size == compiler->size) in sljit_emit_label()
1236 return compiler->last_label; in sljit_emit_label()
1238 label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label)); in sljit_emit_label()
1240 set_label(label, compiler); in sljit_emit_label()
1241 compiler->delay_slot = UNMOVABLE_INS; in sljit_emit_label()
1316 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in sljit_emit_jump() argument
1321 check_sljit_emit_jump(compiler, type); in sljit_emit_jump()
1323 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
1325 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
1330 …if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & ICC_IS_SE… in sljit_emit_jump()
1333 PTR_FAIL_IF(push_inst(compiler, BICC | get_cc(type ^ 1) | 5, UNMOVABLE_INS)); in sljit_emit_jump()
1340 …if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & FCC_IS_SE… in sljit_emit_jump()
1343 PTR_FAIL_IF(push_inst(compiler, FBFCC | get_cc(type ^ 1) | 5, UNMOVABLE_INS)); in sljit_emit_jump()
1348 if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) in sljit_emit_jump()
1354 PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0)); in sljit_emit_jump()
1355 …PTR_FAIL_IF(push_inst(compiler, JMPL | D(type >= SLJIT_FAST_CALL ? TMP_LINK : 0) | S1(TMP_REG2) | … in sljit_emit_jump()
1356 jump->addr = compiler->size; in sljit_emit_jump()
1357 PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS)); in sljit_emit_jump()
1362 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, … in sljit_emit_ijump() argument
1368 check_sljit_emit_ijump(compiler, type, src, srcw); in sljit_emit_ijump()
1374 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
1376 set_jump(jump, compiler, JUMP_ADDR); in sljit_emit_ijump()
1378 if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) in sljit_emit_ijump()
1383 FAIL_IF(emit_const(compiler, TMP_REG2, 0)); in sljit_emit_ijump()
1387 FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw)); in sljit_emit_ijump()
1391 …FAIL_IF(push_inst(compiler, JMPL | D(type >= SLJIT_FAST_CALL ? TMP_LINK : 0) | S1(src_r) | IMM(0),… in sljit_emit_ijump()
1393 jump->addr = compiler->size; in sljit_emit_ijump()
1394 return push_inst(compiler, NOP, UNMOVABLE_INS); in sljit_emit_ijump()
1397 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op_flags() argument
1405 check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type); in sljit_emit_op_flags()
1415 compiler->cache_arg = 0; in sljit_emit_op_flags()
1416 compiler->cache_argw = 0; in sljit_emit_op_flags()
1419 FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw)); in sljit_emit_op_flags()
1425 FAIL_IF(push_inst(compiler, BICC | get_cc(type) | 3, UNMOVABLE_INS)); in sljit_emit_op_flags()
1427 FAIL_IF(push_inst(compiler, FBFCC | get_cc(type) | 3, UNMOVABLE_INS)); in sljit_emit_op_flags()
1429 FAIL_IF(push_inst(compiler, OR | D(reg) | S1(0) | IMM(1), UNMOVABLE_INS)); in sljit_emit_op_flags()
1430 FAIL_IF(push_inst(compiler, OR | D(reg) | S1(0) | IMM(0), UNMOVABLE_INS)); in sljit_emit_op_flags()
1433 …return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw… in sljit_emit_op_flags()
1435 return (reg == TMP_REG2) ? emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw) : SLJIT_SUCCESS; in sljit_emit_op_flags()
1441 SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, slji… in sljit_emit_const() argument
1447 check_sljit_emit_const(compiler, dst, dstw, init_value); in sljit_emit_const()
1450 const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const)); in sljit_emit_const()
1452 set_const(const_, compiler); in sljit_emit_const()
1456 PTR_FAIL_IF(emit_const(compiler, reg, init_value)); in sljit_emit_const()
1459 PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw)); in sljit_emit_const()