Lines Matching refs:code_ptr
278 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
286 SLJIT_ASSERT(const_pool - code_ptr <= CONST_POOL_ALIGNMENT); in patch_pc_relative_loads()
293 while (last_pc_patch < code_ptr) { in patch_pc_relative_loads()
404 static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_uw *code_ptr, sljit_u… in detect_jump_type() argument
413 code_ptr--; in detect_jump_type()
416 diff = ((sljit_sw)jump->u.target - (sljit_sw)(code_ptr + 2) - executable_offset); in detect_jump_type()
419 diff = ((sljit_sw)(code + jump->u.label->size) - (sljit_sw)(code_ptr + 2)); in detect_jump_type()
428 *code_ptr = (BL - CONDITIONAL) | (*(code_ptr + 1) & COND_MASK); in detect_jump_type()
435 *code_ptr = (B - CONDITIONAL) | (*code_ptr & COND_MASK); in detect_jump_type()
441 diff = ((sljit_sw)jump->u.target - (sljit_sw)code_ptr - executable_offset); in detect_jump_type()
444 diff = ((sljit_sw)(code + jump->u.label->size) - (sljit_sw)code_ptr); in detect_jump_type()
452 code_ptr -= 2; in detect_jump_type()
453 …*code_ptr = ((jump->flags & IS_BL) ? (BL - CONDITIONAL) : (B - CONDITIONAL)) | (code_ptr[2] & COND… in detect_jump_type()
654 sljit_uw *code_ptr; in sljit_generate_code() local
701 code_ptr = code; in sljit_generate_code()
739 label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); in sljit_generate_code()
740 label->size = code_ptr - code; in sljit_generate_code()
750 *code_ptr = *buf_ptr++; in sljit_generate_code()
760 if (detect_jump_type(jump, code_ptr, code, executable_offset)) in sljit_generate_code()
761 code_ptr--; in sljit_generate_code()
762 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
764 jump->addr = (sljit_uw)(code_ptr - 2); in sljit_generate_code()
765 if (detect_jump_type(jump, code_ptr, code, executable_offset)) in sljit_generate_code()
766 code_ptr -= 2; in sljit_generate_code()
772 label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr + 1, executable_offset); in sljit_generate_code()
773 label->size = (code_ptr + 1) - code; in sljit_generate_code()
778 const_->addr = (sljit_uw)code_ptr; in sljit_generate_code()
780 const_->addr = (sljit_uw)(code_ptr - 1); in sljit_generate_code()
786 put_label->addr = (sljit_uw)code_ptr; in sljit_generate_code()
791 code_ptr++; in sljit_generate_code()
798 cpool_start_address = ALIGN_INSTRUCTION(code_ptr + 1); in sljit_generate_code()
799 …cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, cpool_… in sljit_generate_code()
802 *code_ptr = B | (((cpool_start_address - code_ptr) + cpool_current_index - 2) & ~PUSH_POOL); in sljit_generate_code()
803 code_ptr = cpool_start_address + cpool_current_index; in sljit_generate_code()
807 last_pc_patch = code_ptr; in sljit_generate_code()
822 cpool_start_address = ALIGN_INSTRUCTION(code_ptr); in sljit_generate_code()
823 …cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, compil… in sljit_generate_code()
825 code_ptr = cpool_start_address + cpool_current_index; in sljit_generate_code()
861 jump->addr = (sljit_uw)code_ptr; in sljit_generate_code()
862 code_ptr[0] = (sljit_uw)buf_ptr; in sljit_generate_code()
863 code_ptr[1] = *buf_ptr; in sljit_generate_code()
864 …inline_set_jump_addr((sljit_uw)code_ptr, executable_offset, (jump->flags & JUMP_LABEL) ? jump->u.l… in sljit_generate_code()
865 code_ptr += 2; in sljit_generate_code()
890 const_->addr = (sljit_uw)code_ptr; in sljit_generate_code()
892 code_ptr[0] = (sljit_uw)buf_ptr; in sljit_generate_code()
893 code_ptr[1] = *buf_ptr; in sljit_generate_code()
899 inline_set_const((sljit_uw)code_ptr, executable_offset, *buf_ptr, 0); in sljit_generate_code()
900 code_ptr += 2; in sljit_generate_code()
922 SLJIT_ASSERT(code_ptr - code <= (sljit_s32)size); in sljit_generate_code()
926 compiler->executable_size = (code_ptr - code) * sizeof(sljit_uw); in sljit_generate_code()
929 code_ptr = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); in sljit_generate_code()
931 SLJIT_CACHE_FLUSH(code, code_ptr); in sljit_generate_code()
932 SLJIT_UPDATE_WX_FLAGS(code, code_ptr, 1); in sljit_generate_code()