Lines Matching refs:jump

154 static SLJIT_INLINE sljit_si detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_i…  in detect_jump_type()  argument
159 if (jump->flags & SLJIT_REWRITABLE_JUMP) { in detect_jump_type()
160 jump->flags |= PATCH_ABS64; in detect_jump_type()
164 if (jump->flags & JUMP_ADDR) in detect_jump_type()
165 target_addr = jump->u.target; in detect_jump_type()
167 SLJIT_ASSERT(jump->flags & JUMP_LABEL); in detect_jump_type()
168 target_addr = (sljit_uw)(code + jump->u.label->size); in detect_jump_type()
172 if (jump->flags & IS_COND) { in detect_jump_type()
175 code_ptr[-5] ^= (jump->flags & IS_CBZ) ? (0x1 << 24) : 0x1; in detect_jump_type()
176 jump->addr -= sizeof(sljit_ins); in detect_jump_type()
177 jump->flags |= PATCH_COND; in detect_jump_type()
184 jump->flags |= PATCH_B; in detect_jump_type()
189 if (jump->flags & IS_COND) in detect_jump_type()
195 if (jump->flags & IS_COND) in detect_jump_type()
197 jump->flags |= PATCH_ABS48; in detect_jump_type()
202 jump->flags |= PATCH_ABS64; in detect_jump_type()
218 struct sljit_jump *jump; in sljit_generate_code() local
232 jump = compiler->jumps; in sljit_generate_code()
242 SLJIT_ASSERT(!jump || jump->addr >= word_count); in sljit_generate_code()
249 if (jump && jump->addr == word_count) { in sljit_generate_code()
250 jump->addr = (sljit_uw)(code_ptr - 4); in sljit_generate_code()
251 code_ptr -= detect_jump_type(jump, code_ptr, code); in sljit_generate_code()
252 jump = jump->next; in sljit_generate_code()
272 SLJIT_ASSERT(!jump); in sljit_generate_code()
276 jump = compiler->jumps; in sljit_generate_code()
277 while (jump) { in sljit_generate_code()
279 addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target; in sljit_generate_code()
280 buf_ptr = (sljit_ins*)jump->addr; in sljit_generate_code()
281 if (jump->flags & PATCH_B) { in sljit_generate_code()
282 addr = (sljit_sw)(addr - jump->addr) >> 2; in sljit_generate_code()
284 buf_ptr[0] = ((jump->flags & IS_BL) ? BL : B) | (addr & 0x3ffffff); in sljit_generate_code()
285 if (jump->flags & IS_COND) in sljit_generate_code()
289 if (jump->flags & PATCH_COND) { in sljit_generate_code()
290 addr = (sljit_sw)(addr - jump->addr) >> 2; in sljit_generate_code()
296 SLJIT_ASSERT((jump->flags & (PATCH_ABS48 | PATCH_ABS64)) || addr <= 0xffffffffl); in sljit_generate_code()
297 SLJIT_ASSERT((jump->flags & PATCH_ABS64) || addr <= 0xffffffffffffl); in sljit_generate_code()
302 if (jump->flags & (PATCH_ABS48 | PATCH_ABS64)) in sljit_generate_code()
304 if (jump->flags & PATCH_ABS64) in sljit_generate_code()
307 jump = jump->next; in sljit_generate_code()
1882 struct sljit_jump *jump; in sljit_emit_jump() local
1887 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
1888 PTR_FAIL_IF(!jump); in sljit_emit_jump()
1889 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
1893 jump->flags |= IS_COND; in sljit_emit_jump()
1897 jump->flags |= IS_BL; in sljit_emit_jump()
1900 jump->addr = compiler->size; in sljit_emit_jump()
1903 return jump; in sljit_emit_jump()
1909 struct sljit_jump *jump; in emit_cmp_to0() local
1915 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in emit_cmp_to0()
1916 PTR_FAIL_IF(!jump); in emit_cmp_to0()
1917 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in emit_cmp_to0()
1918 jump->flags |= IS_CBZ | IS_COND; in emit_cmp_to0()
1935 jump->addr = compiler->size; in emit_cmp_to0()
1937 return jump; in emit_cmp_to0()
1942 struct sljit_jump *jump; in sljit_emit_ijump() local
1957 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
1958 FAIL_IF(!jump); in sljit_emit_ijump()
1959 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
1960 jump->u.target = srcw; in sljit_emit_ijump()
1963 jump->addr = compiler->size; in sljit_emit_ijump()