Lines Matching refs:jump

161 static SLJIT_INLINE sljit_sw detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_i…  in detect_jump_type()  argument
166 if (jump->flags & SLJIT_REWRITABLE_JUMP) { in detect_jump_type()
167 jump->flags |= PATCH_ABS64; in detect_jump_type()
171 if (jump->flags & JUMP_ADDR) in detect_jump_type()
172 target_addr = jump->u.target; in detect_jump_type()
174 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
175 target_addr = (sljit_uw)(code + jump->u.label->size) + (sljit_uw)executable_offset; in detect_jump_type()
180 if (jump->flags & IS_COND) { in detect_jump_type()
183 code_ptr[-5] ^= (jump->flags & IS_CBZ) ? (0x1 << 24) : 0x1; in detect_jump_type()
184 jump->addr -= sizeof(sljit_ins); in detect_jump_type()
185 jump->flags |= PATCH_COND; in detect_jump_type()
192 jump->flags |= PATCH_B; in detect_jump_type()
197 if (jump->flags & IS_COND) in detect_jump_type()
204 if (jump->flags & IS_COND) in detect_jump_type()
206 jump->flags |= PATCH_ABS48; in detect_jump_type()
211 jump->flags |= PATCH_ABS64; in detect_jump_type()
245 struct sljit_jump *jump; in sljit_generate_code() local
263 jump = compiler->jumps; in sljit_generate_code()
274 SLJIT_ASSERT(!jump || jump->addr >= word_count); in sljit_generate_code()
284 if (jump && jump->addr == word_count) { in sljit_generate_code()
285 jump->addr = (sljit_uw)(code_ptr - 4); in sljit_generate_code()
286 code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset); in sljit_generate_code()
287 jump = jump->next; in sljit_generate_code()
299 next_addr = compute_next_addr(label, jump, const_, put_label); in sljit_generate_code()
315 SLJIT_ASSERT(!jump); in sljit_generate_code()
320 jump = compiler->jumps; in sljit_generate_code()
321 while (jump) { in sljit_generate_code()
323 addr = (sljit_sw)((jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target); in sljit_generate_code()
324 buf_ptr = (sljit_ins *)jump->addr; in sljit_generate_code()
326 if (jump->flags & PATCH_B) { in sljit_generate_code()
329 buf_ptr[0] = ((jump->flags & IS_BL) ? BL : B) | (sljit_ins)(addr & 0x3ffffff); in sljit_generate_code()
330 if (jump->flags & IS_COND) in sljit_generate_code()
334 if (jump->flags & PATCH_COND) { in sljit_generate_code()
341 …SLJIT_ASSERT((jump->flags & (PATCH_ABS48 | PATCH_ABS64)) || (sljit_uw)addr <= (sljit_uw)0xffffffff… in sljit_generate_code()
342 SLJIT_ASSERT((jump->flags & PATCH_ABS64) || (sljit_uw)addr <= (sljit_uw)0xffffffffffff); in sljit_generate_code()
347 if (jump->flags & (PATCH_ABS48 | PATCH_ABS64)) in sljit_generate_code()
349 if (jump->flags & PATCH_ABS64) in sljit_generate_code()
352 jump = jump->next; in sljit_generate_code()
1956 struct sljit_jump *jump; in sljit_emit_jump() local
1961 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
1962 PTR_FAIL_IF(!jump); in sljit_emit_jump()
1963 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
1967 jump->flags |= IS_COND; in sljit_emit_jump()
1971 jump->flags |= IS_BL; in sljit_emit_jump()
1974 jump->addr = compiler->size; in sljit_emit_jump()
1977 return jump; in sljit_emit_jump()
1999 struct sljit_jump *jump; in emit_cmp_to0() local
2005 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in emit_cmp_to0()
2006 PTR_FAIL_IF(!jump); in emit_cmp_to0()
2007 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in emit_cmp_to0()
2008 jump->flags |= IS_CBZ | IS_COND; in emit_cmp_to0()
2026 jump->addr = compiler->size; in emit_cmp_to0()
2028 return jump; in emit_cmp_to0()
2033 struct sljit_jump *jump; in sljit_emit_ijump() local
2048 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
2049 FAIL_IF(!jump); in sljit_emit_ijump()
2050 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
2051 jump->u.target = (sljit_uw)srcw; in sljit_emit_ijump()
2054 jump->addr = compiler->size; in sljit_emit_ijump()