Home | History | Annotate | Download | only in sljit_src

Lines Matching defs:jump

156 static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code, sljit_sw executable_offset)
161 if (jump->flags & SLJIT_REWRITABLE_JUMP) {
162 jump->flags |= PATCH_ABS64;
166 if (jump->flags & JUMP_ADDR)
167 target_addr = jump->u.target;
169 SLJIT_ASSERT(jump->flags & JUMP_LABEL);
170 target_addr = (sljit_uw)(code + jump->u.label->size) + (sljit_uw)executable_offset;
175 if (jump->flags & IS_COND) {
178 code_ptr[-5] ^= (jump->flags & IS_CBZ) ? (0x1 << 24) : 0x1;
179 jump->addr -= sizeof(sljit_ins);
180 jump->flags |= PATCH_COND;
187 jump->flags |= PATCH_B;
192 if (jump->flags & IS_COND)
198 if (jump->flags & IS_COND)
200 jump->flags |= PATCH_ABS48;
205 jump->flags |= PATCH_ABS64;
222 struct sljit_jump *jump;
238 jump = compiler->jumps;
248 SLJIT_ASSERT(!jump || jump->addr >= word_count);
255 if (jump && jump->addr == word_count) {
256 jump->addr = (sljit_uw)(code_ptr - 4);
257 code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset);
258 jump = jump->next;
278 SLJIT_ASSERT(!jump);
282 jump = compiler->jumps;
283 while (jump) {
285 addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
286 buf_ptr = (sljit_ins *)jump->addr;
288 if (jump->flags & PATCH_B) {
291 buf_ptr[0] = ((jump->flags & IS_BL) ? BL : B) | (addr & 0x3ffffff);
292 if (jump->flags & IS_COND)
296 if (jump->flags & PATCH_COND) {
303 SLJIT_ASSERT((jump->flags & (PATCH_ABS48 | PATCH_ABS64)) || addr <= 0xffffffffl);
304 SLJIT_ASSERT((jump->flags & PATCH_ABS64) || addr <= 0xffffffffffffl);
309 if (jump->flags & (PATCH_ABS48 | PATCH_ABS64))
311 if (jump->flags & PATCH_ABS64)
314 jump = jump->next;
1890 struct sljit_jump *jump;
1895 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
1896 PTR_FAIL_IF(!jump);
1897 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
1901 jump->flags |= IS_COND;
1905 jump->flags |= IS_BL;
1908 jump->addr = compiler->size;
1911 return jump;
1917 struct sljit_jump *jump;
1923 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
1924 PTR_FAIL_IF(!jump);
1925 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
1926 jump->flags |= IS_CBZ | IS_COND;
1943 jump->addr = compiler->size;
1945 return jump;
1950 struct sljit_jump *jump;
1965 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
1966 FAIL_IF(!jump);
1967 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0));
1968 jump->u.target = srcw;
1971 jump->addr = compiler->size;