• Home
  • Raw
  • Download

Lines Matching refs:jump

164 static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_…  in detect_jump_type()  argument
169 if (jump->flags & SLJIT_REWRITABLE_JUMP) { in detect_jump_type()
170 jump->flags |= PATCH_ABS64; in detect_jump_type()
174 if (jump->flags & JUMP_ADDR) in detect_jump_type()
175 target_addr = jump->u.target; in detect_jump_type()
177 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
178 target_addr = (sljit_uw)(code + jump->u.label->size) + (sljit_uw)executable_offset; in detect_jump_type()
183 if (jump->flags & IS_COND) { in detect_jump_type()
186 code_ptr[-5] ^= (jump->flags & IS_CBZ) ? (0x1 << 24) : 0x1; in detect_jump_type()
187 jump->addr -= sizeof(sljit_ins); in detect_jump_type()
188 jump->flags |= PATCH_COND; in detect_jump_type()
195 jump->flags |= PATCH_B; in detect_jump_type()
200 if (jump->flags & IS_COND) in detect_jump_type()
207 if (jump->flags & IS_COND) in detect_jump_type()
209 jump->flags |= PATCH_ABS48; in detect_jump_type()
214 jump->flags |= PATCH_ABS64; in detect_jump_type()
231 struct sljit_jump *jump; in sljit_generate_code() local
247 jump = compiler->jumps; in sljit_generate_code()
257 SLJIT_ASSERT(!jump || jump->addr >= word_count); in sljit_generate_code()
264 if (jump && jump->addr == word_count) { in sljit_generate_code()
265 jump->addr = (sljit_uw)(code_ptr - 4); in sljit_generate_code()
266 code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset); in sljit_generate_code()
267 jump = jump->next; in sljit_generate_code()
287 SLJIT_ASSERT(!jump); in sljit_generate_code()
291 jump = compiler->jumps; in sljit_generate_code()
292 while (jump) { in sljit_generate_code()
294 addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; in sljit_generate_code()
295 buf_ptr = (sljit_ins *)jump->addr; in sljit_generate_code()
297 if (jump->flags & PATCH_B) { in sljit_generate_code()
300 buf_ptr[0] = ((jump->flags & IS_BL) ? BL : B) | (addr & 0x3ffffff); in sljit_generate_code()
301 if (jump->flags & IS_COND) in sljit_generate_code()
305 if (jump->flags & PATCH_COND) { in sljit_generate_code()
312 SLJIT_ASSERT((jump->flags & (PATCH_ABS48 | PATCH_ABS64)) || addr <= 0xffffffffl); in sljit_generate_code()
313 SLJIT_ASSERT((jump->flags & PATCH_ABS64) || addr <= 0xffffffffffffl); in sljit_generate_code()
318 if (jump->flags & (PATCH_ABS48 | PATCH_ABS64)) in sljit_generate_code()
320 if (jump->flags & PATCH_ABS64) in sljit_generate_code()
323 jump = jump->next; in sljit_generate_code()
1623 struct sljit_jump *jump; in sljit_emit_jump() local
1628 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
1629 PTR_FAIL_IF(!jump); in sljit_emit_jump()
1630 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
1634 jump->flags |= IS_COND; in sljit_emit_jump()
1638 jump->flags |= IS_BL; in sljit_emit_jump()
1641 jump->addr = compiler->size; in sljit_emit_jump()
1644 return jump; in sljit_emit_jump()
1664 struct sljit_jump *jump; in emit_cmp_to0() local
1670 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in emit_cmp_to0()
1671 PTR_FAIL_IF(!jump); in emit_cmp_to0()
1672 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in emit_cmp_to0()
1673 jump->flags |= IS_CBZ | IS_COND; in emit_cmp_to0()
1691 jump->addr = compiler->size; in emit_cmp_to0()
1693 return jump; in emit_cmp_to0()
1698 struct sljit_jump *jump; in sljit_emit_ijump() local
1713 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
1714 FAIL_IF(!jump); in sljit_emit_ijump()
1715 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
1716 jump->u.target = srcw; in sljit_emit_ijump()
1719 jump->addr = compiler->size; in sljit_emit_ijump()