Lines Matching refs:code_ptr

266 static sljit_uw patch_pc_relative_loads(sljit_uw *last_pc_patch, sljit_uw *code_ptr, sljit_uw* cons…  in patch_pc_relative_loads()  argument
274 SLJIT_ASSERT(const_pool - code_ptr <= CONST_POOL_ALIGNMENT); in patch_pc_relative_loads()
281 while (last_pc_patch < code_ptr) { in patch_pc_relative_loads()
392 static SLJIT_INLINE sljit_si detect_jump_type(struct sljit_jump *jump, sljit_uw *code_ptr, sljit_uw… in detect_jump_type() argument
401 code_ptr--; in detect_jump_type()
404 diff = ((sljit_sw)jump->u.target - (sljit_sw)(code_ptr + 2)); in detect_jump_type()
407 diff = ((sljit_sw)(code + jump->u.label->size) - (sljit_sw)(code_ptr + 2)); in detect_jump_type()
416 *code_ptr = (BL - CONDITIONAL) | (*(code_ptr + 1) & COND_MASK); in detect_jump_type()
423 *code_ptr = (B - CONDITIONAL) | (*code_ptr & COND_MASK); in detect_jump_type()
429 diff = ((sljit_sw)jump->u.target - (sljit_sw)code_ptr); in detect_jump_type()
432 diff = ((sljit_sw)(code + jump->u.label->size) - (sljit_sw)code_ptr); in detect_jump_type()
440 code_ptr -= 2; in detect_jump_type()
441 …*code_ptr = ((jump->flags & IS_BL) ? (BL - CONDITIONAL) : (B - CONDITIONAL)) | (code_ptr[2] & COND… in detect_jump_type()
560 sljit_uw *code_ptr; in sljit_generate_code() local
603 code_ptr = code; in sljit_generate_code()
639 label->addr = (sljit_uw)code_ptr; in sljit_generate_code()
640 label->size = code_ptr - code; in sljit_generate_code()
648 *code_ptr = *buf_ptr++; in sljit_generate_code()
655 if (detect_jump_type(jump, code_ptr, code)) in sljit_generate_code()
656 code_ptr--; in sljit_generate_code()
657 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
659 jump->addr = (sljit_uw)(code_ptr - 2); in sljit_generate_code()
660 if (detect_jump_type(jump, code_ptr, code)) in sljit_generate_code()
661 code_ptr -= 2; in sljit_generate_code()
667 label->addr = (sljit_uw)(code_ptr + 1); in sljit_generate_code()
668 label->size = (code_ptr + 1) - code; in sljit_generate_code()
673 const_->addr = (sljit_uw)code_ptr; in sljit_generate_code()
675 const_->addr = (sljit_uw)(code_ptr - 1); in sljit_generate_code()
679 code_ptr++; in sljit_generate_code()
686 cpool_start_address = ALIGN_INSTRUCTION(code_ptr + 1); in sljit_generate_code()
687 …cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, cpool_… in sljit_generate_code()
690 *code_ptr = B | (((cpool_start_address - code_ptr) + cpool_current_index - 2) & ~PUSH_POOL); in sljit_generate_code()
691 code_ptr = cpool_start_address + cpool_current_index; in sljit_generate_code()
695 last_pc_patch = code_ptr; in sljit_generate_code()
709 cpool_start_address = ALIGN_INSTRUCTION(code_ptr); in sljit_generate_code()
710 …cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, compil… in sljit_generate_code()
712 code_ptr = cpool_start_address + cpool_current_index; in sljit_generate_code()
747 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
748 code_ptr[0] = (sljit_uw)buf_ptr; in sljit_generate_code()
749 code_ptr[1] = *buf_ptr; in sljit_generate_code()
750 …inline_set_jump_addr((sljit_uw)code_ptr, (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->… in sljit_generate_code()
751 code_ptr += 2; in sljit_generate_code()
776 const_->addr = (sljit_uw)code_ptr; in sljit_generate_code()
778 code_ptr[0] = (sljit_uw)buf_ptr; in sljit_generate_code()
779 code_ptr[1] = *buf_ptr; in sljit_generate_code()
785 inline_set_const((sljit_uw)code_ptr, *buf_ptr, 0); in sljit_generate_code()
786 code_ptr += 2; in sljit_generate_code()
792 SLJIT_ASSERT(code_ptr - code <= (sljit_si)size); in sljit_generate_code()
795 compiler->executable_size = (code_ptr - code) * sizeof(sljit_uw); in sljit_generate_code()
796 SLJIT_CACHE_FLUSH(code, code_ptr); in sljit_generate_code()