Lines Matching refs:compiler
31 static sljit_s32 emit_load_imm64(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw imm) in emit_load_imm64() argument
35 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2 + sizeof(sljit_sw)); in emit_load_imm64()
70 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler, in sljit_emit_enter() argument
78 …CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, loca… in sljit_emit_enter()
79 set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_emit_enter()
84 compiler->locals_offset = 6 * sizeof(sljit_sw); in sljit_emit_enter()
86 compiler->locals_offset = ((scratches > 2) ? 4 : 2) * sizeof(sljit_sw); in sljit_emit_enter()
95 inst = (sljit_u8*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
105 inst = (sljit_u8*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
115 inst = (sljit_u8*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
156 compiler->local_size = local_size; in sljit_emit_enter()
161 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 + (3 + sizeof(sljit_s32))); in sljit_emit_enter()
185 compiler->skip_checks = 1; in sljit_emit_enter()
187 FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack))); in sljit_emit_enter()
193 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4); in sljit_emit_enter()
202 inst = (sljit_u8*)ensure_buf(compiler, 1 + 7); in sljit_emit_enter()
216 inst = (sljit_u8*)ensure_buf(compiler, 1 + 5); in sljit_emit_enter()
227 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
234 …CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, loc… in sljit_set_context()
235 set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_set_context()
240 compiler->locals_offset = 6 * sizeof(sljit_sw); in sljit_set_context()
242 compiler->locals_offset = ((scratches > 2) ? 4 : 2) * sizeof(sljit_sw); in sljit_set_context()
247 …compiler->local_size = ((local_size + SLJIT_LOCALS_OFFSET + saved_register_size + 15) & ~15) - sav… in sljit_set_context()
251 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op,… in sljit_emit_return() argument
257 CHECK(check_sljit_emit_return(compiler, op, src, srcw)); in sljit_emit_return()
259 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
263 if (compiler->fscratches >= 6 || compiler->fsaveds >= 1) { in sljit_emit_return()
264 inst = (sljit_u8*)ensure_buf(compiler, 1 + 5); in sljit_emit_return()
272 if (compiler->local_size > 0) { in sljit_emit_return()
273 if (compiler->local_size <= 127) { in sljit_emit_return()
274 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4); in sljit_emit_return()
280 *inst = compiler->local_size; in sljit_emit_return()
283 inst = (sljit_u8*)ensure_buf(compiler, 1 + 7); in sljit_emit_return()
289 sljit_unaligned_store_s32(inst, compiler->local_size); in sljit_emit_return()
293 tmp = compiler->scratches; in sljit_emit_return()
296 inst = (sljit_u8*)ensure_buf(compiler, 1 + size); in sljit_emit_return()
304 …tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJ… in sljit_emit_return()
307 inst = (sljit_u8*)ensure_buf(compiler, 1 + size); in sljit_emit_return()
315 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); in sljit_emit_return()
326 static sljit_s32 emit_do_imm32(struct sljit_compiler *compiler, sljit_u8 rex, sljit_u8 opcode, slji… in emit_do_imm32() argument
331 inst = (sljit_u8*)ensure_buf(compiler, 1 + length); in emit_do_imm32()
341 static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 size, in emit_x86_instruction() argument
354 SLJIT_ASSERT(!(a & SLJIT_IMM) || compiler->mode32 || IS_HALFWORD(imma)); in emit_x86_instruction()
370 if (!compiler->mode32 && !(flags & EX86_NO_REXW)) in emit_x86_instruction()
385 PTR_FAIL_IF(emit_load_imm64(compiler, TMP_REG3, immb)); in emit_x86_instruction()
431 imma &= compiler->mode32 ? 0x1f : 0x3f; in emit_x86_instruction()
453 inst = (sljit_u8*)ensure_buf(compiler, 1 + inst_size); in emit_x86_instruction()
550 static SLJIT_INLINE sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 type) in call_with_args() argument
557 inst = (sljit_u8*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6)); in call_with_args()
571 inst = (sljit_u8*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6)); in call_with_args()
586 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32… in sljit_emit_fast_enter() argument
591 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
600 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); in sljit_emit_fast_enter()
607 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2); in sljit_emit_fast_enter()
616 compiler->mode32 = 1; in sljit_emit_fast_enter()
617 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in sljit_emit_fast_enter()
623 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s3… in sljit_emit_fast_return() argument
628 CHECK(check_sljit_emit_fast_return(compiler, src, srcw)); in sljit_emit_fast_return()
632 FAIL_IF(emit_load_imm64(compiler, TMP_REG1, srcw)); in sljit_emit_fast_return()
638 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 1); in sljit_emit_fast_return()
645 inst = (sljit_u8*)ensure_buf(compiler, 1 + 2 + 1); in sljit_emit_fast_return()
655 compiler->mode32 = 1; in sljit_emit_fast_return()
656 inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw); in sljit_emit_fast_return()
661 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); in sljit_emit_fast_return()
668 inst = (sljit_u8*)ensure_buf(compiler, 1 + 5 + 1); in sljit_emit_fast_return()
686 static sljit_s32 emit_mov_int(struct sljit_compiler *compiler, sljit_s32 sign, in emit_mov_int() argument
693 compiler->mode32 = 0; in emit_mov_int()
701 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_sw)(sljit_s32)srcw, dst, dstw); in emit_mov_int()
706 return emit_load_imm64(compiler, dst, srcw); in emit_mov_int()
708 compiler->mode32 = 1; in emit_mov_int()
709 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_sw)(sljit_s32)srcw, dst, dstw); in emit_mov_int()
712 compiler->mode32 = 0; in emit_mov_int()
722 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src, srcw); in emit_mov_int()
726 compiler->mode32 = 1; in emit_mov_int()
727 FAIL_IF(emit_mov(compiler, dst_r, 0, src, srcw)); in emit_mov_int()
728 compiler->mode32 = 0; in emit_mov_int()
733 compiler->mode32 = 1; in emit_mov_int()
734 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw); in emit_mov_int()
737 compiler->mode32 = 0; in emit_mov_int()