Lines Matching refs:compiler
29 static sljit_si emit_do_imm(struct sljit_compiler *compiler, sljit_ub opcode, sljit_sw imm) in emit_do_imm() argument
33 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + sizeof(sljit_sw)); in emit_do_imm()
66 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, in sljit_emit_enter() argument
74 …CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, loca… in sljit_emit_enter()
75 set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_emit_enter()
77 compiler->args = args; in sljit_emit_enter()
78 compiler->flags_saved = 0; in sljit_emit_enter()
86 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
146 inst = (sljit_ub*)ensure_buf(compiler, 1 + 17); in sljit_emit_enter()
166 compiler->local_size = local_size; in sljit_emit_enter()
170 FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_R0], local_size)); in sljit_emit_enter()
173 FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_R0], local_size)); in sljit_emit_enter()
174 FAIL_IF(emit_non_cum_binary(compiler, SUB_r_rm, SUB_rm_r, SUB, SUB_EAX_i32, in sljit_emit_enter()
177 FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack))); in sljit_emit_enter()
182 return emit_non_cum_binary(compiler, SUB_r_rm, SUB_rm_r, SUB, SUB_EAX_i32, in sljit_emit_enter()
186 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
191 …CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, loc… in sljit_set_context()
192 set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_set_context()
194 compiler->args = args; in sljit_set_context()
198 compiler->local_size = ((SLJIT_LOCALS_OFFSET + saveds + local_size + 15) & ~15) - saveds; in sljit_set_context()
201 compiler->local_size = SLJIT_LOCALS_OFFSET + ((local_size + 7) & ~7); in sljit_set_context()
203 compiler->local_size = SLJIT_LOCALS_OFFSET + ((local_size + 3) & ~3); in sljit_set_context()
208 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, s… in sljit_emit_return() argument
214 CHECK(check_sljit_emit_return(compiler, op, src, srcw)); in sljit_emit_return()
215 SLJIT_ASSERT(compiler->args >= 0); in sljit_emit_return()
217 compiler->flags_saved = 0; in sljit_emit_return()
218 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
220 SLJIT_ASSERT(compiler->local_size > 0); in sljit_emit_return()
221 FAIL_IF(emit_cum_binary(compiler, ADD_r_rm, ADD_rm_r, ADD, ADD_EAX_i32, in sljit_emit_return()
222 SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, compiler->local_size)); in sljit_emit_return()
225 if (compiler->options & SLJIT_DOUBLE_ALIGNMENT) { in sljit_emit_return()
226 inst = (sljit_ub*)ensure_buf(compiler, 1 + 3); in sljit_emit_return()
236 size = 2 + (compiler->scratches > 7 ? (compiler->scratches - 7) : 0) + in sljit_emit_return()
237 (compiler->saveds <= 3 ? compiler->saveds : 3); in sljit_emit_return()
239 if (compiler->args > 2) in sljit_emit_return()
242 if (compiler->args > 0) in sljit_emit_return()
245 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_return()
250 if (compiler->saveds > 0 || compiler->scratches > 9) in sljit_emit_return()
252 if (compiler->saveds > 1 || compiler->scratches > 8) in sljit_emit_return()
254 if (compiler->saveds > 2 || compiler->scratches > 7) in sljit_emit_return()
258 if (compiler->args > 2) in sljit_emit_return()
274 static sljit_ub* emit_x86_instruction(struct sljit_compiler *compiler, sljit_si size, in emit_x86_instruction() argument
350 inst = (sljit_ub*)ensure_buf(compiler, 1 + inst_size); in emit_x86_instruction()
441 static SLJIT_INLINE sljit_si call_with_args(struct sljit_compiler *compiler, sljit_si type) in call_with_args() argument
446 inst = (sljit_ub*)ensure_buf(compiler, type >= SLJIT_CALL3 ? 1 + 2 + 1 : 1 + 2); in call_with_args()
455 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 * (type - SLJIT_CALL0)); in call_with_args()
479 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si d… in sljit_emit_fast_enter() argument
484 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
495 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_fast_enter()
504 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in sljit_emit_fast_enter()
510 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fast_return() argument
515 CHECK(check_sljit_emit_fast_return(compiler, src, srcw)); in sljit_emit_fast_return()
521 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 1); in sljit_emit_fast_return()
528 inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw); in sljit_emit_fast_return()
533 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_fast_return()
539 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5 + 1); in sljit_emit_fast_return()