Lines Matching refs:jump
651 static sljit_u8* detect_far_jump_type(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_sw executa…
653 static sljit_u8* detect_far_jump_type(struct sljit_jump *jump, sljit_u8 *code_ptr);
654 static sljit_u8* generate_mov_addr_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_u8 *code…
657 static sljit_u8* detect_near_jump_type(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_u8 *code,… in detect_near_jump_type() argument
659 sljit_uw type = jump->flags >> TYPE_SHIFT; in detect_near_jump_type()
663 if (jump->flags & JUMP_ADDR) in detect_near_jump_type()
664 label_addr = jump->u.target - (sljit_uw)executable_offset; in detect_near_jump_type()
666 label_addr = (sljit_uw)(code + jump->u.label->size); in detect_near_jump_type()
670 return detect_far_jump_type(jump, code_ptr); in detect_near_jump_type()
690 jump->addr = (sljit_uw)code_ptr; in detect_near_jump_type()
693 jump->flags |= PATCH_MB; in detect_near_jump_type()
696 jump->flags |= PATCH_MW; in detect_near_jump_type()
703 static void generate_jump_or_mov_addr(struct sljit_jump *jump, sljit_sw executable_offset) in generate_jump_or_mov_addr() argument
705 sljit_uw flags = jump->flags; in generate_jump_or_mov_addr()
706 sljit_uw addr = (flags & JUMP_ADDR) ? jump->u.target : jump->u.label->u.addr; in generate_jump_or_mov_addr()
707 sljit_uw jump_addr = jump->addr; in generate_jump_or_mov_addr()
760 struct sljit_jump *jump; in reduce_code_size() local
772 jump = compiler->jumps; in reduce_code_size()
775 next_jump_addr = SLJIT_GET_NEXT_ADDRESS(jump); in reduce_code_size()
795 if (!(jump->flags & JUMP_MOV_ADDR)) { in reduce_code_size()
797 …size_reduce_max = size_reduce + (((jump->flags >> TYPE_SHIFT) < SLJIT_JUMP) ? CJUMP_MAX_SIZE : JUM… in reduce_code_size()
800 if (!(jump->flags & SLJIT_REWRITABLE_JUMP)) { in reduce_code_size()
801 if (jump->flags & JUMP_ADDR) { in reduce_code_size()
803 if (jump->u.target <= 0xffffffffl) in reduce_code_size()
808 diff = (sljit_sw)jump->u.label->size - (sljit_sw)(jump->addr - size_reduce); in reduce_code_size()
809 type = jump->flags >> TYPE_SHIFT; in reduce_code_size()
839 jump->flags |= (size_reduce_max - size_reduce) << JUMP_SIZE_SHIFT; in reduce_code_size()
847 if (!(jump->flags & JUMP_ADDR)) { in reduce_code_size()
848 diff = (sljit_sw)jump->u.label->size - (sljit_sw)(jump->addr - size_reduce - 3); in reduce_code_size()
852 } else if (jump->u.target <= 0xffffffffl) in reduce_code_size()
853 size_reduce += (jump->flags & MOV_ADDR_HI) ? 4 : 5; in reduce_code_size()
856 jump->flags |= (size_reduce_max - size_reduce) << JUMP_SIZE_SHIFT; in reduce_code_size()
861 jump = jump->next; in reduce_code_size()
862 next_jump_addr = SLJIT_GET_NEXT_ADDRESS(jump); in reduce_code_size()
882 struct sljit_jump *jump; in sljit_generate_code() local
899 jump = compiler->jumps; in sljit_generate_code()
924 if (!(jump->flags & SLJIT_REWRITABLE_JUMP)) in sljit_generate_code()
925 code_ptr = detect_near_jump_type(jump, code_ptr, code, executable_offset); in sljit_generate_code()
928 code_ptr = detect_far_jump_type(jump, code_ptr, executable_offset); in sljit_generate_code()
930 code_ptr = detect_far_jump_type(jump, code_ptr); in sljit_generate_code()
934 SLJIT_ASSERT((sljit_uw)code_ptr - addr <= ((jump->flags >> JUMP_SIZE_SHIFT) & 0x1f)); in sljit_generate_code()
935 jump = jump->next; in sljit_generate_code()
939 code_ptr = generate_mov_addr_code(jump, code_ptr, code, executable_offset); in sljit_generate_code()
941 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
942 jump = jump->next; in sljit_generate_code()
958 SLJIT_ASSERT(!jump); in sljit_generate_code()
962 jump = compiler->jumps; in sljit_generate_code()
963 while (jump) { in sljit_generate_code()
964 generate_jump_or_mov_addr(jump, executable_offset); in sljit_generate_code()
965 jump = jump->next; in sljit_generate_code()
3404 struct sljit_jump *jump; local
3409 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
3410 PTR_FAIL_IF_NULL(jump);
3411 …set_jump(jump, compiler, (sljit_u32)((type & SLJIT_REWRITABLE_JUMP) | ((type & 0xff) << TYPE_SHIFT…
3414 jump->addr = compiler->size;
3421 return jump;
3427 struct sljit_jump *jump; local
3436 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
3437 FAIL_IF_NULL(jump);
3438 set_jump(jump, compiler, (sljit_u32)(JUMP_ADDR | (type << TYPE_SHIFT)));
3439 jump->u.target = (sljit_uw)srcw;
3441 jump->addr = compiler->size;
4939 struct sljit_jump *jump; local
4951 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
4952 PTR_FAIL_IF(!jump);
4953 set_mov_addr(jump, compiler, 0);
4960 jump->addr = compiler->size;
4963 jump->flags |= MOV_ADDR_HI;
4978 return jump;