Lines Matching refs:jump

159 static SLJIT_INLINE sljit_sw detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_i…  in detect_jump_type()  argument
164 if (jump->flags & SLJIT_REWRITABLE_JUMP) { in detect_jump_type()
165 jump->flags |= PATCH_ABS64; in detect_jump_type()
169 if (jump->flags & JUMP_ADDR) in detect_jump_type()
170 target_addr = jump->u.target; in detect_jump_type()
172 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
173 target_addr = (sljit_uw)(code + jump->u.label->size) + (sljit_uw)executable_offset; in detect_jump_type()
178 if (jump->flags & IS_COND) { in detect_jump_type()
181 code_ptr[-5] ^= (jump->flags & IS_CBZ) ? (0x1 << 24) : 0x1; in detect_jump_type()
182 jump->addr -= sizeof(sljit_ins); in detect_jump_type()
183 jump->flags |= PATCH_COND; in detect_jump_type()
190 jump->flags |= PATCH_B; in detect_jump_type()
195 if (jump->flags & IS_COND) in detect_jump_type()
202 if (jump->flags & IS_COND) in detect_jump_type()
204 jump->flags |= PATCH_ABS48; in detect_jump_type()
209 jump->flags |= PATCH_ABS64; in detect_jump_type()
243 struct sljit_jump *jump; in sljit_generate_code() local
261 jump = compiler->jumps; in sljit_generate_code()
272 SLJIT_ASSERT(!jump || jump->addr >= word_count); in sljit_generate_code()
282 if (jump && jump->addr == word_count) { in sljit_generate_code()
283 jump->addr = (sljit_uw)(code_ptr - 4); in sljit_generate_code()
284 code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset); in sljit_generate_code()
285 jump = jump->next; in sljit_generate_code()
297 next_addr = compute_next_addr(label, jump, const_, put_label); in sljit_generate_code()
313 SLJIT_ASSERT(!jump); in sljit_generate_code()
318 jump = compiler->jumps; in sljit_generate_code()
319 while (jump) { in sljit_generate_code()
321 addr = (sljit_sw)((jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target); in sljit_generate_code()
322 buf_ptr = (sljit_ins *)jump->addr; in sljit_generate_code()
324 if (jump->flags & PATCH_B) { in sljit_generate_code()
327 buf_ptr[0] = ((jump->flags & IS_BL) ? BL : B) | (sljit_ins)(addr & 0x3ffffff); in sljit_generate_code()
328 if (jump->flags & IS_COND) in sljit_generate_code()
332 if (jump->flags & PATCH_COND) { in sljit_generate_code()
339 …SLJIT_ASSERT((jump->flags & (PATCH_ABS48 | PATCH_ABS64)) || (sljit_uw)addr <= (sljit_uw)0xffffffff… in sljit_generate_code()
340 SLJIT_ASSERT((jump->flags & PATCH_ABS64) || (sljit_uw)addr <= (sljit_uw)0xffffffffffff); in sljit_generate_code()
345 if (jump->flags & (PATCH_ABS48 | PATCH_ABS64)) in sljit_generate_code()
347 if (jump->flags & PATCH_ABS64) in sljit_generate_code()
350 jump = jump->next; in sljit_generate_code()
1787 struct sljit_jump *jump; in sljit_emit_jump() local
1792 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
1793 PTR_FAIL_IF(!jump); in sljit_emit_jump()
1794 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
1798 jump->flags |= IS_COND; in sljit_emit_jump()
1802 jump->flags |= IS_BL; in sljit_emit_jump()
1805 jump->addr = compiler->size; in sljit_emit_jump()
1808 return jump; in sljit_emit_jump()
1834 struct sljit_jump *jump; in emit_cmp_to0() local
1840 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in emit_cmp_to0()
1841 PTR_FAIL_IF(!jump); in emit_cmp_to0()
1842 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in emit_cmp_to0()
1843 jump->flags |= IS_CBZ | IS_COND; in emit_cmp_to0()
1861 jump->addr = compiler->size; in emit_cmp_to0()
1863 return jump; in emit_cmp_to0()
1868 struct sljit_jump *jump; in sljit_emit_ijump() local
1883 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
1884 FAIL_IF(!jump); in sljit_emit_ijump()
1885 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
1886 jump->u.target = (sljit_uw)srcw; in sljit_emit_ijump()
1889 jump->addr = compiler->size; in sljit_emit_ijump()