Lines Matching refs:jump

476 static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_uw *code_ptr, sljit_u…  in detect_jump_type()  argument
480 if (jump->flags & SLJIT_REWRITABLE_JUMP) in detect_jump_type()
484 if (jump->flags & IS_BL) in detect_jump_type()
488 if (jump->flags & JUMP_ADDR) in detect_jump_type()
489 diff = ((sljit_sw)jump->u.target - (sljit_sw)(code_ptr + 2) - executable_offset); in detect_jump_type()
491 SLJIT_ASSERT(jump->u.label != NULL); in detect_jump_type()
492 diff = ((sljit_sw)(code + jump->u.label->size) - (sljit_sw)(code_ptr + 2)); in detect_jump_type()
500 if (jump->flags & IS_BL) { in detect_jump_type()
503 jump->flags |= PATCH_B; in detect_jump_type()
510 jump->flags |= PATCH_B; in detect_jump_type()
515 …*code_ptr = ((jump->flags & IS_BL) ? (BL - CONDITIONAL) : (B - CONDITIONAL)) | (*code_ptr & COND_M… in detect_jump_type()
516 jump->flags |= PATCH_B; in detect_jump_type()
714 static SLJIT_INLINE sljit_sw mov_addr_get_length(struct sljit_jump *jump, sljit_ins *code_ptr, slji… in mov_addr_get_length() argument
720 if (jump->flags & JUMP_ADDR) in mov_addr_get_length()
721 addr = jump->u.target; in mov_addr_get_length()
723 addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code + jump->u.label->size, executable_offset); in mov_addr_get_length()
729 jump->flags |= PATCH_B; in mov_addr_get_length()
745 struct sljit_jump *jump; in reduce_code_size() local
753 jump = compiler->jumps; in reduce_code_size()
780 jump->addr -= size_reduce; in reduce_code_size()
781 if (!(jump->flags & JUMP_MOV_ADDR)) { in reduce_code_size()
784 if (!(jump->flags & (SLJIT_REWRITABLE_JUMP | JUMP_ADDR))) { in reduce_code_size()
786 diff = (sljit_sw)jump->u.label->size - (sljit_sw)jump->addr - 2; in reduce_code_size()
797 if (!(jump->flags & JUMP_ADDR)) { in reduce_code_size()
798 diff = (sljit_sw)jump->u.label->size - (sljit_sw)jump->addr; in reduce_code_size()
806 jump->flags |= total_size << JUMP_SIZE_SHIFT; in reduce_code_size()
807 jump = jump->next; in reduce_code_size()
808 next_jump_addr = SLJIT_GET_NEXT_ADDRESS(jump); in reduce_code_size()
838 struct sljit_jump *jump; in sljit_generate_code() local
870 jump = compiler->jumps; in sljit_generate_code()
901 SLJIT_ASSERT(!jump || jump->addr >= word_count); in sljit_generate_code()
913 if (!(jump->flags & JUMP_MOV_ADDR)) { in sljit_generate_code()
915 if (detect_jump_type(jump, code_ptr, code, executable_offset)) in sljit_generate_code()
917 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
919 word_count += jump->flags >> JUMP_SIZE_SHIFT; in sljit_generate_code()
920 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
921 if (!detect_jump_type(jump, code_ptr, code, executable_offset)) { in sljit_generate_code()
928 …SLJIT_ASSERT((sljit_uw)code_ptr - jump->addr <= (jump->flags >> JUMP_SIZE_SHIFT) * sizeof(sljit_in… in sljit_generate_code()
932 word_count += jump->flags >> JUMP_SIZE_SHIFT; in sljit_generate_code()
935 code_ptr += mov_addr_get_length(jump, code_ptr, code, executable_offset); in sljit_generate_code()
936 jump->addr = addr; in sljit_generate_code()
938 jump = jump->next; in sljit_generate_code()
939 next_jump_addr = SLJIT_GET_NEXT_ADDRESS(jump); in sljit_generate_code()
978 SLJIT_ASSERT(!jump); in sljit_generate_code()
1005 jump = compiler->jumps; in sljit_generate_code()
1006 while (jump) { in sljit_generate_code()
1007 addr = (jump->flags & JUMP_ADDR) ? jump->u.target : jump->u.label->u.addr; in sljit_generate_code()
1008 buf_ptr = (sljit_ins*)jump->addr; in sljit_generate_code()
1010 if (jump->flags & JUMP_MOV_ADDR) { in sljit_generate_code()
1017 if (jump->flags & PATCH_B) { in sljit_generate_code()
1038 } else if (jump->flags & PATCH_B) { in sljit_generate_code()
1044 if (jump->flags & IS_BL) in sljit_generate_code()
1047 if (jump->flags & SLJIT_REWRITABLE_JUMP) { in sljit_generate_code()
1048 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
1065 jump = jump->next; in sljit_generate_code()
3092 struct sljit_jump *jump; in sljit_emit_jump() local
3097 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
3098 PTR_FAIL_IF(!jump); in sljit_emit_jump()
3099 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
3108 jump->addr = compiler->size; in sljit_emit_jump()
3112 if (jump->flags & SLJIT_REWRITABLE_JUMP) in sljit_emit_jump()
3116 jump->flags |= IS_BL; in sljit_emit_jump()
3117 jump->addr = compiler->size; in sljit_emit_jump()
3121 jump->addr = compiler->size; in sljit_emit_jump()
3123 jump->flags |= IS_BL; in sljit_emit_jump()
3127 return jump; in sljit_emit_jump()
3313 struct sljit_jump *jump; in sljit_emit_call() local
3329 jump = sljit_emit_jump(compiler, type); in sljit_emit_call()
3330 PTR_FAIL_IF(jump == NULL); in sljit_emit_call()
3341 return jump; in sljit_emit_call()
3347 return jump; in sljit_emit_call()
3367 struct sljit_jump *jump; in sljit_emit_ijump() local
3387 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
3388 FAIL_IF(!jump); in sljit_emit_ijump()
3389 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
3390 jump->u.target = (sljit_uw)srcw; in sljit_emit_ijump()
3395 jump->addr = compiler->size; in sljit_emit_ijump()
3398 jump->addr = compiler->size; in sljit_emit_ijump()
3402 jump->addr = compiler->size; in sljit_emit_ijump()
4599 struct sljit_jump *jump; in sljit_emit_mov_addr() local
4615 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_mov_addr()
4616 PTR_FAIL_IF(!jump); in sljit_emit_mov_addr()
4617 set_mov_addr(jump, compiler, 1); in sljit_emit_mov_addr()
4625 return jump; in sljit_emit_mov_addr()