Lines Matching refs:jump

154 static SLJIT_INLINE sljit_sw detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_i…  in detect_jump_type()  argument
159 if (jump->flags & SLJIT_REWRITABLE_JUMP) { in detect_jump_type()
160 jump->flags |= PATCH_ABS64; in detect_jump_type()
164 if (jump->flags & JUMP_ADDR) in detect_jump_type()
165 target_addr = jump->u.target; in detect_jump_type()
167 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
168 target_addr = (sljit_uw)(code + jump->u.label->size) + (sljit_uw)executable_offset; in detect_jump_type()
173 if (jump->flags & IS_COND) { in detect_jump_type()
176 code_ptr[-5] ^= (jump->flags & IS_CBZ) ? (0x1 << 24) : 0x1; in detect_jump_type()
177 jump->addr -= sizeof(sljit_ins); in detect_jump_type()
178 jump->flags |= PATCH_COND; in detect_jump_type()
185 jump->flags |= PATCH_B; in detect_jump_type()
190 if (jump->flags & IS_COND) in detect_jump_type()
197 if (jump->flags & IS_COND) in detect_jump_type()
199 jump->flags |= PATCH_ABS48; in detect_jump_type()
204 jump->flags |= PATCH_ABS64; in detect_jump_type()
238 struct sljit_jump *jump; in sljit_generate_code() local
256 jump = compiler->jumps; in sljit_generate_code()
267 SLJIT_ASSERT(!jump || jump->addr >= word_count); in sljit_generate_code()
277 if (jump && jump->addr == word_count) { in sljit_generate_code()
278 jump->addr = (sljit_uw)(code_ptr - 4); in sljit_generate_code()
279 code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset); in sljit_generate_code()
280 jump = jump->next; in sljit_generate_code()
292 next_addr = compute_next_addr(label, jump, const_, put_label); in sljit_generate_code()
308 SLJIT_ASSERT(!jump); in sljit_generate_code()
313 jump = compiler->jumps; in sljit_generate_code()
314 while (jump) { in sljit_generate_code()
316 addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; in sljit_generate_code()
317 buf_ptr = (sljit_ins *)jump->addr; in sljit_generate_code()
319 if (jump->flags & PATCH_B) { in sljit_generate_code()
322 buf_ptr[0] = ((jump->flags & IS_BL) ? BL : B) | (addr & 0x3ffffff); in sljit_generate_code()
323 if (jump->flags & IS_COND) in sljit_generate_code()
327 if (jump->flags & PATCH_COND) { in sljit_generate_code()
334 SLJIT_ASSERT((jump->flags & (PATCH_ABS48 | PATCH_ABS64)) || addr <= 0xffffffffl); in sljit_generate_code()
335 SLJIT_ASSERT((jump->flags & PATCH_ABS64) || addr <= 0xffffffffffffl); in sljit_generate_code()
340 if (jump->flags & (PATCH_ABS48 | PATCH_ABS64)) in sljit_generate_code()
342 if (jump->flags & PATCH_ABS64) in sljit_generate_code()
345 jump = jump->next; in sljit_generate_code()
1685 struct sljit_jump *jump; in sljit_emit_jump() local
1690 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
1691 PTR_FAIL_IF(!jump); in sljit_emit_jump()
1692 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
1696 jump->flags |= IS_COND; in sljit_emit_jump()
1700 jump->flags |= IS_BL; in sljit_emit_jump()
1703 jump->addr = compiler->size; in sljit_emit_jump()
1706 return jump; in sljit_emit_jump()
1726 struct sljit_jump *jump; in emit_cmp_to0() local
1732 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in emit_cmp_to0()
1733 PTR_FAIL_IF(!jump); in emit_cmp_to0()
1734 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in emit_cmp_to0()
1735 jump->flags |= IS_CBZ | IS_COND; in emit_cmp_to0()
1753 jump->addr = compiler->size; in emit_cmp_to0()
1755 return jump; in emit_cmp_to0()
1760 struct sljit_jump *jump; in sljit_emit_ijump() local
1775 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
1776 FAIL_IF(!jump); in sljit_emit_ijump()
1777 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
1778 jump->u.target = srcw; in sljit_emit_ijump()
1781 jump->addr = compiler->size; in sljit_emit_ijump()