Lines Matching refs:code_ptr

361 static sljit_u8* detect_far_jump_type(struct sljit_jump *jump, sljit_u8 *code_ptr)  in detect_far_jump_type()  argument
372 code_ptr[0] = U8(get_jump_code(type ^ 0x1) - 0x10); in detect_far_jump_type()
373 code_ptr[1] = short_addr ? (6 + 3) : (10 + 3); in detect_far_jump_type()
374 code_ptr += 2; in detect_far_jump_type()
377 code_ptr[0] = short_addr ? REX_B : (REX_W | REX_B); in detect_far_jump_type()
378 code_ptr[1] = MOV_r_i32 | reg_lmap[TMP_REG2]; in detect_far_jump_type()
379 code_ptr += 2; in detect_far_jump_type()
380 jump->addr = (sljit_uw)code_ptr; in detect_far_jump_type()
385 sljit_unaligned_store_s32(code_ptr, (sljit_s32)jump->u.target); in detect_far_jump_type()
387 sljit_unaligned_store_sw(code_ptr, (sljit_sw)jump->u.target); in detect_far_jump_type()
389 code_ptr += short_addr ? sizeof(sljit_s32) : sizeof(sljit_sw); in detect_far_jump_type()
391 code_ptr[0] = REX_B; in detect_far_jump_type()
392 code_ptr[1] = GROUP_FF; in detect_far_jump_type()
393 code_ptr[2] = U8(MOD_REG | (type >= SLJIT_FAST_CALL ? CALL_rm : JMP_rm) | reg_lmap[TMP_REG2]); in detect_far_jump_type()
395 return code_ptr + 3; in detect_far_jump_type()
398 static sljit_u8* generate_mov_addr_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_u8 *code… in generate_mov_addr_code() argument
411 diff = (sljit_sw)addr - (sljit_sw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); in generate_mov_addr_code()
415 code_ptr -= SSIZE_OF(s32) - 1; in generate_mov_addr_code()
417 SLJIT_ASSERT((code_ptr[-3 - SSIZE_OF(s32)] & 0xf8) == REX_W); in generate_mov_addr_code()
418 SLJIT_ASSERT((code_ptr[-2 - SSIZE_OF(s32)] & 0xf8) == MOV_r_i32); in generate_mov_addr_code()
420 code_ptr[-3 - SSIZE_OF(s32)] = U8(REX_W | ((code_ptr[-3 - SSIZE_OF(s32)] & 0x1) << 2)); in generate_mov_addr_code()
421 code_ptr[-1 - SSIZE_OF(s32)] = U8(((code_ptr[-2 - SSIZE_OF(s32)] & 0x7) << 3) | 0x5); in generate_mov_addr_code()
422 code_ptr[-2 - SSIZE_OF(s32)] = LEA_r_m; in generate_mov_addr_code()
425 return code_ptr; in generate_mov_addr_code()
429 return code_ptr; in generate_mov_addr_code()
432 code_ptr -= 2 + sizeof(sljit_uw); in generate_mov_addr_code()
434 SLJIT_ASSERT((code_ptr[0] & 0xf8) == REX_W); in generate_mov_addr_code()
435 SLJIT_ASSERT((code_ptr[1] & 0xf8) == MOV_r_i32); in generate_mov_addr_code()
437 if ((code_ptr[0] & 0x07) != 0) { in generate_mov_addr_code()
439 code_ptr[0] = U8(code_ptr[0] & ~0x08); in generate_mov_addr_code()
440 code_ptr += 2 + sizeof(sljit_s32); in generate_mov_addr_code()
443 code_ptr[0] = code_ptr[1]; in generate_mov_addr_code()
444 code_ptr += 1 + sizeof(sljit_s32); in generate_mov_addr_code()
447 return code_ptr; in generate_mov_addr_code()