/linux-4.4.14/arch/x86/lib/ |
H A D | insn.c | 250 * Populates @insn->modrm and updates @insn->next_byte to point past the 252 * (prefixes and opcode(s)). No effect if @insn->modrm.got is already 1. 256 struct insn_field *modrm = &insn->modrm; insn_get_modrm() local 258 if (modrm->got) insn_get_modrm() 265 modrm->value = mod; insn_get_modrm() 266 modrm->nbytes = 1; insn_get_modrm() 278 modrm->got = 1; insn_get_modrm() 294 struct insn_field *modrm = &insn->modrm; insn_rip_relative() local 298 if (!modrm->got) insn_rip_relative() 304 return (modrm->nbytes && (modrm->value & 0xc7) == 0x5); insn_rip_relative() 316 insn_byte_t modrm; insn_get_sib() local 320 if (!insn->modrm.got) insn_get_sib() 322 if (insn->modrm.nbytes) { insn_get_sib() 323 modrm = (insn_byte_t)insn->modrm.value; insn_get_sib() 325 X86_MODRM_MOD(modrm) != 3 && X86_MODRM_RM(modrm) == 4) { insn_get_sib() 353 if (insn->modrm.nbytes) { insn_get_displacement() 355 * Interpreting the modrm byte: insn_get_displacement() 371 mod = X86_MODRM_MOD(insn->modrm.value); insn_get_displacement() 372 rm = X86_MODRM_RM(insn->modrm.value); insn_get_displacement()
|
H A D | inat.c | 59 insn_attr_t inat_get_group_attribute(insn_byte_t modrm, int lpfx_id, inat_get_group_attribute() argument 70 if (inat_has_variant(table[X86_MODRM_REG(modrm)]) && lpfx_id) { inat_get_group_attribute() 75 return table[X86_MODRM_REG(modrm)] | inat_get_group_attribute()
|
/linux-4.4.14/tools/perf/util/intel-pt-decoder/ |
H A D | insn.c | 250 * Populates @insn->modrm and updates @insn->next_byte to point past the 252 * (prefixes and opcode(s)). No effect if @insn->modrm.got is already 1. 256 struct insn_field *modrm = &insn->modrm; insn_get_modrm() local 258 if (modrm->got) insn_get_modrm() 265 modrm->value = mod; insn_get_modrm() 266 modrm->nbytes = 1; insn_get_modrm() 278 modrm->got = 1; insn_get_modrm() 294 struct insn_field *modrm = &insn->modrm; insn_rip_relative() local 298 if (!modrm->got) insn_rip_relative() 304 return (modrm->nbytes && (modrm->value & 0xc7) == 0x5); insn_rip_relative() 316 insn_byte_t modrm; insn_get_sib() local 320 if (!insn->modrm.got) insn_get_sib() 322 if (insn->modrm.nbytes) { insn_get_sib() 323 modrm = (insn_byte_t)insn->modrm.value; insn_get_sib() 325 X86_MODRM_MOD(modrm) != 3 && X86_MODRM_RM(modrm) == 4) { insn_get_sib() 353 if (insn->modrm.nbytes) { insn_get_displacement() 355 * Interpreting the modrm byte: insn_get_displacement() 371 mod = X86_MODRM_MOD(insn->modrm.value); insn_get_displacement() 372 rm = X86_MODRM_RM(insn->modrm.value); insn_get_displacement()
|
H A D | inat.c | 59 insn_attr_t inat_get_group_attribute(insn_byte_t modrm, int lpfx_id, inat_get_group_attribute() argument 70 if (inat_has_variant(table[X86_MODRM_REG(modrm)]) && lpfx_id) { inat_get_group_attribute() 75 return table[X86_MODRM_REG(modrm)] | inat_get_group_attribute()
|
H A D | insn.h | 48 struct insn_field modrm; member in struct:insn 74 #define X86_MODRM_MOD(modrm) (((modrm) & 0xc0) >> 6) 75 #define X86_MODRM_REG(modrm) (((modrm) & 0x38) >> 3) 76 #define X86_MODRM_RM(modrm) ((modrm) & 0x07) 139 return insn->opcode.got && insn->modrm.got && insn->sib.got && insn_complete() 190 return insn_offset_modrm(insn) + insn->modrm.nbytes; insn_offset_sib()
|
H A D | inat.h | 104 extern insn_attr_t inat_get_group_attribute(insn_byte_t modrm,
|
H A D | intel-pt-insn-decoder.c | 111 ext = (insn->modrm.bytes[0] >> 3) & 0x7; intel_pt_insn_decoder()
|
/linux-4.4.14/arch/x86/include/asm/ |
H A D | insn.h | 48 struct insn_field modrm; member in struct:insn 74 #define X86_MODRM_MOD(modrm) (((modrm) & 0xc0) >> 6) 75 #define X86_MODRM_REG(modrm) (((modrm) & 0x38) >> 3) 76 #define X86_MODRM_RM(modrm) ((modrm) & 0x07) 139 return insn->opcode.got && insn->modrm.got && insn->sib.got && insn_complete() 190 return insn_offset_modrm(insn) + insn->modrm.nbytes; insn_offset_sib()
|
H A D | kvm_emulate.h | 36 u8 modrm_mod; /* mod part of modrm */ 38 u8 modrm_rm; /* rm part of modrm */ 329 /* modrm */ 330 u8 modrm; member in struct:x86_emulate_ctxt
|
H A D | inat.h | 104 extern insn_attr_t inat_get_group_attribute(insn_byte_t modrm,
|
/linux-4.4.14/arch/x86/kernel/ |
H A D | uprobes.c | 57 #define MODRM_REG(insn) X86_MODRM_REG((insn)->modrm.value) 265 * - Where necessary, examine the modrm byte and allow only valid instructions 333 * - There's always a modrm byte with bit layout "00 reg 101". 337 * has no effect on rip-relative mode. It doesn't make modrm byte 350 * insn_rip_relative() would have decoded rex_prefix, vex_prefix, modrm. riprel_analyze() 380 * This is tricky since there are insns with modrm byte riprel_analyze() 381 * which also use registers not encoded in modrm byte: riprel_analyze() 386 * Encoding: 0f c7/1 modrm riprel_analyze() 398 * Encoding: 0f f7 modrm, 66 0f f7 modrm, vex-encoded: c5 f9 f7 modrm. riprel_analyze() 402 * (its modrm byte must have mode=11). riprel_analyze() 406 * Summary: I don't know any insns with modrm byte which riprel_analyze() 416 reg = MODRM_REG(insn); /* Fetch modrm.reg */ riprel_analyze() 448 * Point cursor at the modrm byte. The next 4 bytes are the riprel_analyze() 454 * Change modrm from "00 reg 101" to "10 reg reg2". Example: riprel_analyze()
|
/linux-4.4.14/arch/x86/tools/ |
H A D | test_get_len.c | 77 dump_field(fp, "modrm", "\t", &insn->modrm); dump_insn()
|
H A D | insn_sanity.c | 87 dump_field(fp, "modrm", "\t", &insn->modrm); dump_insn()
|
/linux-4.4.14/arch/x86/kvm/ |
H A D | emulate.c | 123 #define Group (1<<15) /* Bits 3:5 of modrm byte extend opcode */ 1169 ctxt->modrm_mod = (ctxt->modrm & 0xc0) >> 6; decode_modrm() 1170 ctxt->modrm_reg |= (ctxt->modrm & 0x38) >> 3; decode_modrm() 1171 ctxt->modrm_rm = base_reg | (ctxt->modrm & 0x07); decode_modrm() 4893 ctxt->modrm = insn_fetch(u8, ctxt); x86_decode_insn() 4897 (mode == X86EMUL_MODE_PROT64 || (ctxt->modrm & 0xc0) == 0xc0)) { x86_decode_insn() 4904 goffset = (ctxt->modrm >> 3) & 7; x86_decode_insn() 4908 goffset = (ctxt->modrm >> 3) & 7; x86_decode_insn() 4909 if ((ctxt->modrm >> 6) == 3) x86_decode_insn() 4915 goffset = ctxt->modrm & 7; x86_decode_insn() 4930 if (ctxt->modrm > 0xbf) x86_decode_insn() 4931 opcode = opcode.u.esc->high[ctxt->modrm - 0xc0]; x86_decode_insn() 4933 opcode = opcode.u.esc->op[(ctxt->modrm >> 3) & 7]; x86_decode_insn() 4936 if ((ctxt->modrm >> 6) == 3) x86_decode_insn() 5116 (void *)&ctxt->modrm - (void *)&ctxt->rip_relative); init_decode_cache()
|
/linux-4.4.14/arch/x86/kernel/kprobes/ |
H A D | opt.c | 197 (X86_MODRM_REG(insn->modrm.value) & 6) == 4) || /* Jump */ insn_is_indirect_jump()
|
/linux-4.4.14/arch/x86/mm/ |
H A D | mpx.c | 103 regno = X86_MODRM_RM(insn->modrm.value); get_reg_offset() 148 if (X86_MODRM_MOD(insn->modrm.value) == 3) { mpx_get_addr_ref() 256 bndregno = X86_MODRM_REG(insn.modrm.value); mpx_generate_siginfo()
|
/linux-4.4.14/arch/x86/kernel/cpu/ |
H A D | perf_event_intel_lbr.c | 767 ext = (insn.modrm.bytes[0] >> 3) & 0x7; branch_type()
|