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_s32 detect_jump_type(struct sljit_jump *jump, sljit_uw *code_ptr, sljit_u… in detect_jump_type() argument
401 code_ptr--; in detect_jump_type()
404 diff = ((sljit_sw)jump->u.target - (sljit_sw)(code_ptr + 2) - executable_offset); 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 - executable_offset); 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()
569 sljit_uw *code_ptr; in sljit_generate_code() local
614 code_ptr = code; in sljit_generate_code()
650 label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); in sljit_generate_code()
651 label->size = code_ptr - code; in sljit_generate_code()
659 *code_ptr = *buf_ptr++; in sljit_generate_code()
666 if (detect_jump_type(jump, code_ptr, code, executable_offset)) in sljit_generate_code()
667 code_ptr--; in sljit_generate_code()
668 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
670 jump->addr = (sljit_uw)(code_ptr - 2); in sljit_generate_code()
671 if (detect_jump_type(jump, code_ptr, code, executable_offset)) in sljit_generate_code()
672 code_ptr -= 2; in sljit_generate_code()
678 label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr + 1, executable_offset); in sljit_generate_code()
679 label->size = (code_ptr + 1) - code; in sljit_generate_code()
684 const_->addr = (sljit_uw)code_ptr; in sljit_generate_code()
686 const_->addr = (sljit_uw)(code_ptr - 1); in sljit_generate_code()
690 code_ptr++; in sljit_generate_code()
697 cpool_start_address = ALIGN_INSTRUCTION(code_ptr + 1); in sljit_generate_code()
698 …cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, cpool_… in sljit_generate_code()
701 *code_ptr = B | (((cpool_start_address - code_ptr) + cpool_current_index - 2) & ~PUSH_POOL); in sljit_generate_code()
702 code_ptr = cpool_start_address + cpool_current_index; in sljit_generate_code()
706 last_pc_patch = code_ptr; in sljit_generate_code()
720 cpool_start_address = ALIGN_INSTRUCTION(code_ptr); in sljit_generate_code()
721 …cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, compil… in sljit_generate_code()
723 code_ptr = cpool_start_address + cpool_current_index; in sljit_generate_code()
759 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
760 code_ptr[0] = (sljit_uw)buf_ptr; in sljit_generate_code()
761 code_ptr[1] = *buf_ptr; in sljit_generate_code()
762 …inline_set_jump_addr((sljit_uw)code_ptr, executable_offset, (jump->flags & JUMP_LABEL) ? jump->u.l… in sljit_generate_code()
763 code_ptr += 2; in sljit_generate_code()
788 const_->addr = (sljit_uw)code_ptr; in sljit_generate_code()
790 code_ptr[0] = (sljit_uw)buf_ptr; in sljit_generate_code()
791 code_ptr[1] = *buf_ptr; in sljit_generate_code()
797 inline_set_const((sljit_uw)code_ptr, executable_offset, *buf_ptr, 0); in sljit_generate_code()
798 code_ptr += 2; in sljit_generate_code()
804 SLJIT_ASSERT(code_ptr - code <= (sljit_s32)size); in sljit_generate_code()
808 compiler->executable_size = (code_ptr - code) * sizeof(sljit_uw); in sljit_generate_code()
811 code_ptr = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); in sljit_generate_code()
813 SLJIT_CACHE_FLUSH(code, code_ptr); in sljit_generate_code()