Lines Matching refs:jump

166 static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_ins *code, sljit_sw …  in detect_jump_type()  argument
172 inst = (sljit_ins *)jump->addr; in detect_jump_type()
174 if (jump->flags & SLJIT_REWRITABLE_JUMP) in detect_jump_type()
177 if (jump->flags & JUMP_ADDR) in detect_jump_type()
178 target_addr = jump->u.target; in detect_jump_type()
180 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
181 target_addr = (sljit_uw)(code + jump->u.label->size) + (sljit_uw)executable_offset; in detect_jump_type()
186 if (jump->flags & IS_COND) { in detect_jump_type()
191 jump->flags |= PATCH_B; in detect_jump_type()
193 jump->addr = (sljit_uw)inst; in detect_jump_type()
202 if (jump->flags & IS_COND) { in detect_jump_type()
210 jump->flags |= PATCH_J; in detect_jump_type()
216 if (jump->flags & IS_COND) in detect_jump_type()
219 jump->flags |= PATCH_REL32; in detect_jump_type()
225 if (jump->flags & IS_COND) in detect_jump_type()
228 jump->flags |= PATCH_ABS32; in detect_jump_type()
234 if (jump->flags & IS_COND) in detect_jump_type()
237 jump->flags |= PATCH_ABS44; in detect_jump_type()
243 if (jump->flags & IS_COND) in detect_jump_type()
246 jump->flags |= PATCH_ABS52; in detect_jump_type()
289 struct sljit_jump *jump = NULL; in load_addr_to_reg() local
299 jump = (struct sljit_jump*)dst; in load_addr_to_reg()
300 flags = jump->flags; in load_addr_to_reg()
301 inst = (sljit_ins*)jump->addr; in load_addr_to_reg()
302 addr = (flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; in load_addr_to_reg()
366 if (jump != NULL) { in load_addr_to_reg()
386 struct sljit_jump *jump; in sljit_generate_code() local
404 jump = compiler->jumps; in sljit_generate_code()
415 SLJIT_ASSERT(!jump || jump->addr >= word_count); in sljit_generate_code()
425 if (jump && jump->addr == word_count) { in sljit_generate_code()
431 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
432 code_ptr = detect_jump_type(jump, code, executable_offset); in sljit_generate_code()
433 jump = jump->next; in sljit_generate_code()
451 next_addr = compute_next_addr(label, jump, const_, put_label); in sljit_generate_code()
467 SLJIT_ASSERT(!jump); in sljit_generate_code()
472 jump = compiler->jumps; in sljit_generate_code()
473 while (jump) { in sljit_generate_code()
475 if (!(jump->flags & (PATCH_B | PATCH_J | PATCH_REL32))) { in sljit_generate_code()
476 load_addr_to_reg(jump, TMP_REG1); in sljit_generate_code()
480 addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; in sljit_generate_code()
481 buf_ptr = (sljit_ins *)jump->addr; in sljit_generate_code()
484 if (jump->flags & PATCH_B) { in sljit_generate_code()
492 if (jump->flags & PATCH_REL32) { in sljit_generate_code()
507 buf_ptr[0] = JAL | RD((jump->flags & IS_CALL) ? RETURN_ADDR_REG : TMP_ZERO) | (sljit_ins)addr; in sljit_generate_code()
509 jump = jump->next; in sljit_generate_code()
2292 struct sljit_jump *jump; in sljit_emit_jump() local
2298 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
2299 PTR_FAIL_IF(!jump); in sljit_emit_jump()
2300 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
2354 jump->flags |= IS_COND; in sljit_emit_jump()
2357 jump->addr = compiler->size; in sljit_emit_jump()
2361 jump->flags |= IS_CALL; in sljit_emit_jump()
2373 return jump; in sljit_emit_jump()
2396 struct sljit_jump *jump; in sljit_emit_cmp() local
2441 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_cmp()
2442 PTR_FAIL_IF(!jump); in sljit_emit_cmp()
2443 set_jump(jump, compiler, (sljit_u32)((type & SLJIT_REWRITABLE_JUMP) | IS_COND)); in sljit_emit_cmp()
2481 jump->addr = compiler->size; in sljit_emit_cmp()
2490 return jump; in sljit_emit_cmp()
2497 struct sljit_jump *jump; in sljit_emit_ijump() local
2512 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
2513 FAIL_IF(!jump); in sljit_emit_ijump()
2514 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_CALL : 0)); in sljit_emit_ijump()
2515 jump->u.target = (sljit_uw)srcw; in sljit_emit_ijump()
2517 jump->addr = compiler->size; in sljit_emit_ijump()