Lines Matching refs:compiler

29 static sljit_si emit_load_imm64(struct sljit_compiler *compiler, sljit_si reg, sljit_sw imm)  in emit_load_imm64()  argument
33 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2 + sizeof(sljit_sw)); in emit_load_imm64()
90 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, in sljit_emit_enter() argument
98 …CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, loca… in sljit_emit_enter()
99 set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_emit_enter()
101 compiler->flags_saved = 0; in sljit_emit_enter()
109 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
119 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
129 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
170 compiler->local_size = local_size; in sljit_emit_enter()
175 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 + (3 + sizeof(sljit_si))); in sljit_emit_enter()
199 compiler->skip_checks = 1; in sljit_emit_enter()
201 FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack))); in sljit_emit_enter()
207 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4); in sljit_emit_enter()
216 inst = (sljit_ub*)ensure_buf(compiler, 1 + 7); in sljit_emit_enter()
229 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5); in sljit_emit_enter()
240 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
247 …CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, loc… in sljit_set_context()
248 set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_set_context()
252compiler->local_size = ((local_size + SLJIT_LOCALS_OFFSET + saved_register_size + 15) & ~15) - sav… in sljit_set_context()
256 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, s… in sljit_emit_return() argument
262 CHECK(check_sljit_emit_return(compiler, op, src, srcw)); in sljit_emit_return()
264 compiler->flags_saved = 0; in sljit_emit_return()
265 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
269 if (compiler->fscratches >= 6 || compiler->fsaveds >= 1) { in sljit_emit_return()
270 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5); in sljit_emit_return()
278 SLJIT_ASSERT(compiler->local_size > 0); in sljit_emit_return()
279 if (compiler->local_size <= 127) { in sljit_emit_return()
280 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4); in sljit_emit_return()
286 *inst = compiler->local_size; in sljit_emit_return()
289 inst = (sljit_ub*)ensure_buf(compiler, 1 + 7); in sljit_emit_return()
295 *(sljit_si*)inst = compiler->local_size; in sljit_emit_return()
298 tmp = compiler->scratches; in sljit_emit_return()
301 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_return()
309 …tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJ… in sljit_emit_return()
312 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_return()
320 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_return()
331 static sljit_si emit_do_imm32(struct sljit_compiler *compiler, sljit_ub rex, sljit_ub opcode, sljit… in emit_do_imm32() argument
336 inst = (sljit_ub*)ensure_buf(compiler, 1 + length); in emit_do_imm32()
346 static sljit_ub* emit_x86_instruction(struct sljit_compiler *compiler, sljit_si size, in emit_x86_instruction() argument
359 SLJIT_ASSERT(!(a & SLJIT_IMM) || compiler->mode32 || IS_HALFWORD(imma)); in emit_x86_instruction()
375 if (!compiler->mode32 && !(flags & EX86_NO_REXW)) in emit_x86_instruction()
390 if (emit_load_imm64(compiler, TMP_REG3, immb)) in emit_x86_instruction()
437 imma &= compiler->mode32 ? 0x1f : 0x3f; in emit_x86_instruction()
459 inst = (sljit_ub*)ensure_buf(compiler, 1 + inst_size); in emit_x86_instruction()
556 static SLJIT_INLINE sljit_si call_with_args(struct sljit_compiler *compiler, sljit_si type) in call_with_args() argument
563 inst = (sljit_ub*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6)); in call_with_args()
577 inst = (sljit_ub*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6)); in call_with_args()
592 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si d… in sljit_emit_fast_enter() argument
597 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
606 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_fast_enter()
613 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2); in sljit_emit_fast_enter()
622 compiler->mode32 = 1; in sljit_emit_fast_enter()
623 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in sljit_emit_fast_enter()
629 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fast_return() argument
634 CHECK(check_sljit_emit_fast_return(compiler, src, srcw)); in sljit_emit_fast_return()
638 FAIL_IF(emit_load_imm64(compiler, TMP_REG1, srcw)); in sljit_emit_fast_return()
644 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 1); in sljit_emit_fast_return()
651 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2 + 1); in sljit_emit_fast_return()
661 compiler->mode32 = 1; in sljit_emit_fast_return()
662 inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw); in sljit_emit_fast_return()
667 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_fast_return()
674 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5 + 1); in sljit_emit_fast_return()
692 static sljit_si emit_mov_int(struct sljit_compiler *compiler, sljit_si sign, in emit_mov_int() argument
699 compiler->mode32 = 0; in emit_mov_int()
707 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_sw)(sljit_si)srcw, dst, dstw); in emit_mov_int()
712 return emit_load_imm64(compiler, dst, srcw); in emit_mov_int()
714 compiler->mode32 = 1; in emit_mov_int()
715 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_sw)(sljit_si)srcw, dst, dstw); in emit_mov_int()
718 compiler->mode32 = 0; in emit_mov_int()
728 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src, srcw); in emit_mov_int()
732 compiler->mode32 = 1; in emit_mov_int()
733 FAIL_IF(emit_mov(compiler, dst_r, 0, src, srcw)); in emit_mov_int()
734 compiler->mode32 = 0; in emit_mov_int()
739 compiler->mode32 = 1; in emit_mov_int()
740 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw); in emit_mov_int()
743 compiler->mode32 = 0; in emit_mov_int()