Lines Matching refs:jump

404 static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_uw *code_ptr, sljit_u…  in detect_jump_type()  argument
408 if (jump->flags & SLJIT_REWRITABLE_JUMP) in detect_jump_type()
412 if (jump->flags & IS_BL) in detect_jump_type()
415 if (jump->flags & JUMP_ADDR) in detect_jump_type()
416 diff = ((sljit_sw)jump->u.target - (sljit_sw)(code_ptr + 2) - executable_offset); in detect_jump_type()
418 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
419 diff = ((sljit_sw)(code + jump->u.label->size) - (sljit_sw)(code_ptr + 2)); in detect_jump_type()
426 if (jump->flags & IS_BL) { in detect_jump_type()
429 jump->flags |= PATCH_B; in detect_jump_type()
436 jump->flags |= PATCH_B; in detect_jump_type()
440 if (jump->flags & JUMP_ADDR) in detect_jump_type()
441 diff = ((sljit_sw)jump->u.target - (sljit_sw)code_ptr - executable_offset); in detect_jump_type()
443 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
444 diff = ((sljit_sw)(code + jump->u.label->size) - (sljit_sw)code_ptr); in detect_jump_type()
453 …*code_ptr = ((jump->flags & IS_BL) ? (BL - CONDITIONAL) : (B - CONDITIONAL)) | (code_ptr[2] & COND… in detect_jump_type()
454 jump->flags |= PATCH_B; in detect_jump_type()
672 struct sljit_jump *jump; in sljit_generate_code() local
707 jump = compiler->jumps; in sljit_generate_code()
743 next_addr = compute_next_addr(label, jump, const_, put_label); in sljit_generate_code()
753 SLJIT_ASSERT(!jump || jump->addr >= word_count); in sljit_generate_code()
758 if (jump && jump->addr == word_count) { in sljit_generate_code()
760 if (detect_jump_type(jump, code_ptr, code, executable_offset)) in sljit_generate_code()
762 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
764 jump->addr = (sljit_uw)(code_ptr - 2); in sljit_generate_code()
765 if (detect_jump_type(jump, code_ptr, code, executable_offset)) in sljit_generate_code()
768 jump = jump->next; in sljit_generate_code()
789 next_addr = compute_next_addr(label, jump, const_, put_label); in sljit_generate_code()
815 SLJIT_ASSERT(!jump); in sljit_generate_code()
843 jump = compiler->jumps; in sljit_generate_code()
844 while (jump) { in sljit_generate_code()
845 buf_ptr = (sljit_uw *)jump->addr; in sljit_generate_code()
847 if (jump->flags & PATCH_B) { in sljit_generate_code()
849 if (!(jump->flags & JUMP_ADDR)) { in sljit_generate_code()
850 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in sljit_generate_code()
851 …SLJIT_ASSERT(((sljit_sw)jump->u.label->addr - addr) <= 0x01ffffff && ((sljit_sw)jump->u.label->add… in sljit_generate_code()
852 *buf_ptr |= (((sljit_sw)jump->u.label->addr - addr) >> 2) & 0x00ffffff; in sljit_generate_code()
855 …SLJIT_ASSERT(((sljit_sw)jump->u.target - addr) <= 0x01ffffff && ((sljit_sw)jump->u.target - addr) … in sljit_generate_code()
856 *buf_ptr |= (((sljit_sw)jump->u.target - addr) >> 2) & 0x00ffffff; in sljit_generate_code()
859 else if (jump->flags & SLJIT_REWRITABLE_JUMP) { in sljit_generate_code()
861 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
864 …ump_addr((sljit_uw)code_ptr, executable_offset, (jump->flags & JUMP_LABEL) ? jump->u.label->addr :… in sljit_generate_code()
867 …jump_addr((sljit_uw)buf_ptr, executable_offset, (jump->flags & JUMP_LABEL) ? jump->u.label->addr :… in sljit_generate_code()
872 if (jump->flags & IS_BL) in sljit_generate_code()
878 *buf_ptr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; in sljit_generate_code()
880 …jump_addr((sljit_uw)buf_ptr, executable_offset, (jump->flags & JUMP_LABEL) ? jump->u.label->addr :… in sljit_generate_code()
883 jump = jump->next; in sljit_generate_code()
2238 struct sljit_jump *jump; in sljit_emit_jump() local
2243 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
2244 PTR_FAIL_IF(!jump); in sljit_emit_jump()
2245 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
2256 if (jump->flags & SLJIT_REWRITABLE_JUMP) { in sljit_emit_jump()
2257 jump->addr = compiler->size; in sljit_emit_jump()
2262 jump->flags |= IS_BL; in sljit_emit_jump()
2266 if (!(jump->flags & SLJIT_REWRITABLE_JUMP)) in sljit_emit_jump()
2267 jump->addr = compiler->size; in sljit_emit_jump()
2270 jump->flags |= IS_BL; in sljit_emit_jump()
2273 jump->addr = compiler->size; in sljit_emit_jump()
2275 return jump; in sljit_emit_jump()
2482 struct sljit_jump *jump; in sljit_emit_call() local
2496 jump = sljit_emit_jump(compiler, type); in sljit_emit_call()
2497 PTR_FAIL_IF(jump == NULL); in sljit_emit_call()
2500 return jump; in sljit_emit_call()
2515 struct sljit_jump *jump; in sljit_emit_ijump() local
2535 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
2536 FAIL_IF(!jump); in sljit_emit_ijump()
2537 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
2538 jump->u.target = srcw; in sljit_emit_ijump()
2550 jump->addr = compiler->size; in sljit_emit_ijump()