Lines Matching refs:jump

248 static SLJIT_INLINE sljit_si detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_i…  in detect_jump_type()  argument
255 if (jump->flags & (SLJIT_REWRITABLE_JUMP | IS_CALL)) in detect_jump_type()
258 if (jump->flags & SLJIT_REWRITABLE_JUMP) in detect_jump_type()
262 if (jump->flags & JUMP_ADDR) in detect_jump_type()
263 target_addr = jump->u.target; in detect_jump_type()
265 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
266 target_addr = (sljit_uw)(code + jump->u.label->size); in detect_jump_type()
270 if (jump->flags & IS_CALL) in detect_jump_type()
277 if (jump->flags & IS_COND) { in detect_jump_type()
279 jump->flags |= PATCH_B; in detect_jump_type()
283 jump->flags |= PATCH_B | PATCH_ABS_B; in detect_jump_type()
292 jump->flags |= PATCH_B | extra_jump_flags; in detect_jump_type()
296 jump->flags |= PATCH_B | PATCH_ABS_B | extra_jump_flags; in detect_jump_type()
305 jump->flags |= PATCH_ABS32; in detect_jump_type()
309 jump->flags |= PATCH_ABS48; in detect_jump_type()
328 struct sljit_jump *jump; in sljit_generate_code() local
349 jump = compiler->jumps; in sljit_generate_code()
357 SLJIT_ASSERT(!jump || jump->addr >= word_count); in sljit_generate_code()
366 if (jump && jump->addr == word_count) { in sljit_generate_code()
368 jump->addr = (sljit_uw)(code_ptr - 3); in sljit_generate_code()
370 jump->addr = (sljit_uw)(code_ptr - 6); in sljit_generate_code()
372 if (detect_jump_type(jump, code_ptr, code)) { in sljit_generate_code()
377 if (jump->flags & PATCH_ABS32) { in sljit_generate_code()
382 else if (jump->flags & PATCH_ABS48) { in sljit_generate_code()
397 if (jump->flags & REMOVE_COND) { in sljit_generate_code()
400 jump->addr += sizeof(sljit_ins); in sljit_generate_code()
402 jump->flags -= IS_COND; in sljit_generate_code()
405 jump = jump->next; in sljit_generate_code()
425 SLJIT_ASSERT(!jump); in sljit_generate_code()
433 jump = compiler->jumps; in sljit_generate_code()
434 while (jump) { in sljit_generate_code()
436 addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; in sljit_generate_code()
437 buf_ptr = (sljit_ins*)jump->addr; in sljit_generate_code()
438 if (jump->flags & PATCH_B) { in sljit_generate_code()
439 if (jump->flags & IS_COND) { in sljit_generate_code()
440 if (!(jump->flags & PATCH_ABS_B)) { in sljit_generate_code()
441 addr = addr - jump->addr; in sljit_generate_code()
451 if (!(jump->flags & PATCH_ABS_B)) { in sljit_generate_code()
452 addr = addr - jump->addr; in sljit_generate_code()
468 if (jump->flags & PATCH_ABS32) { in sljit_generate_code()
474 if (jump->flags & PATCH_ABS48) { in sljit_generate_code()
487 jump = jump->next; in sljit_generate_code()
2133 struct sljit_jump *jump; in sljit_emit_jump() local
2143 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
2144 PTR_FAIL_IF(!jump); in sljit_emit_jump()
2145 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
2150 jump->flags |= IS_COND; in sljit_emit_jump()
2153 jump->flags |= IS_CALL; in sljit_emit_jump()
2158 jump->addr = compiler->size; in sljit_emit_jump()
2160 return jump; in sljit_emit_jump()
2165 struct sljit_jump *jump = NULL; in sljit_emit_ijump() local
2184 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
2185 FAIL_IF(!jump); in sljit_emit_ijump()
2186 set_jump(jump, compiler, JUMP_ADDR); in sljit_emit_ijump()
2187 jump->u.target = srcw; in sljit_emit_ijump()
2190 jump->flags |= IS_CALL; in sljit_emit_ijump()
2201 if (jump) in sljit_emit_ijump()
2202 jump->addr = compiler->size; in sljit_emit_ijump()