/linux/arch/x86/lib/ |
A D | insn.c | 335 struct insn_field *modrm = &insn->modrm; in insn_get_modrm() local 339 if (modrm->got) in insn_get_modrm() 366 modrm->got = 1; in insn_get_modrm() 383 struct insn_field *modrm = &insn->modrm; in insn_rip_relative() local 389 if (!modrm->got) { in insn_rip_relative() 398 return (modrm->nbytes && (modrm->bytes[0] & 0xc7) == 0x5); in insn_rip_relative() 414 insn_byte_t modrm; in insn_get_sib() local 420 if (!insn->modrm.got) { in insn_get_sib() 426 if (insn->modrm.nbytes) { in insn_get_sib() 427 modrm = insn->modrm.bytes[0]; in insn_get_sib() [all …]
|
A D | insn-eval.c | 450 regno = X86_MODRM_RM(insn->modrm.value); in get_reg_offset() 464 regno = X86_MODRM_REG(insn->modrm.value); in get_reg_offset() 562 if (X86_MODRM_MOD(insn->modrm.value) == 3) { in get_reg_offset_16() 579 (X86_MODRM_RM(insn->modrm.value) == 6)) in get_reg_offset_16() 933 if (X86_MODRM_MOD(insn->modrm.value) != 3) in get_eff_addr_reg() 986 if (X86_MODRM_MOD(insn->modrm.value) > 2) in get_eff_addr_modrm() 1051 if (!insn->modrm.nbytes) in get_eff_addr_modrm_16() 1054 if (X86_MODRM_MOD(insn->modrm.value) > 2) in get_eff_addr_modrm_16() 1122 if (!insn->modrm.nbytes) in get_eff_addr_sib() 1125 if (X86_MODRM_MOD(insn->modrm.value) > 2) in get_eff_addr_sib() [all …]
|
A D | inat.c | 45 insn_attr_t inat_get_group_attribute(insn_byte_t modrm, int lpfx_id, in inat_get_group_attribute() argument 56 if (inat_has_variant(table[X86_MODRM_REG(modrm)]) && lpfx_id) { in inat_get_group_attribute() 61 return table[X86_MODRM_REG(modrm)] | in inat_get_group_attribute()
|
/linux/tools/arch/x86/lib/ |
A D | insn.c | 335 struct insn_field *modrm = &insn->modrm; in insn_get_modrm() local 339 if (modrm->got) in insn_get_modrm() 366 modrm->got = 1; in insn_get_modrm() 383 struct insn_field *modrm = &insn->modrm; in insn_rip_relative() local 389 if (!modrm->got) { in insn_rip_relative() 398 return (modrm->nbytes && (modrm->bytes[0] & 0xc7) == 0x5); in insn_rip_relative() 414 insn_byte_t modrm; in insn_get_sib() local 420 if (!insn->modrm.got) { in insn_get_sib() 426 if (insn->modrm.nbytes) { in insn_get_sib() 427 modrm = insn->modrm.bytes[0]; in insn_get_sib() [all …]
|
A D | inat.c | 45 insn_attr_t inat_get_group_attribute(insn_byte_t modrm, int lpfx_id, in inat_get_group_attribute() argument 56 if (inat_has_variant(table[X86_MODRM_REG(modrm)]) && lpfx_id) { in inat_get_group_attribute() 61 return table[X86_MODRM_REG(modrm)] | in inat_get_group_attribute()
|
/linux/arch/x86/include/asm/ |
A D | insn.h | 80 struct insn_field modrm; member 107 #define X86_MODRM_MOD(modrm) (((modrm) & 0xc0) >> 6) argument 108 #define X86_MODRM_REG(modrm) (((modrm) & 0x38) >> 3) argument 109 #define X86_MODRM_RM(modrm) ((modrm) & 0x07) argument 232 return insn_offset_modrm(insn) + insn->modrm.nbytes; in insn_offset_sib() 273 X86_MODRM_REG(insn->modrm.bytes[0]) == 2); in insn_masking_exception()
|
A D | inat.h | 102 extern insn_attr_t inat_get_group_attribute(insn_byte_t modrm,
|
/linux/tools/arch/x86/include/asm/ |
A D | insn.h | 80 struct insn_field modrm; member 107 #define X86_MODRM_MOD(modrm) (((modrm) & 0xc0) >> 6) argument 108 #define X86_MODRM_REG(modrm) (((modrm) & 0x38) >> 3) argument 109 #define X86_MODRM_RM(modrm) ((modrm) & 0x07) argument 232 return insn_offset_modrm(insn) + insn->modrm.nbytes; in insn_offset_sib() 273 X86_MODRM_REG(insn->modrm.bytes[0]) == 2); in insn_masking_exception()
|
A D | inat.h | 102 extern insn_attr_t inat_get_group_attribute(insn_byte_t modrm,
|
/linux/arch/x86/kernel/ |
A D | umip.c | 156 if (!insn->modrm.nbytes) in identify_insn() 164 switch (X86_MODRM_REG(insn->modrm.value)) { in identify_insn() 175 if (X86_MODRM_REG(insn->modrm.value) == 0) in identify_insn() 177 else if (X86_MODRM_REG(insn->modrm.value) == 1) in identify_insn() 224 if (X86_MODRM_MOD(insn->modrm.value) == 3) in emulate_umip_insn() 277 if (X86_MODRM_MOD(insn->modrm.value) == 3) in emulate_umip_insn() 379 if (X86_MODRM_MOD(insn.modrm.value) == 3) { in fixup_umip_exception()
|
A D | alternative.c | 348 u8 modrm; in emit_indirect() local 352 modrm = 0x10; /* Reg = 2; CALL r/m */ in emit_indirect() 356 modrm = 0x20; /* Reg = 4; JMP r/m */ in emit_indirect() 369 modrm |= 0xc0; /* Mod = 3 */ in emit_indirect() 370 modrm += reg; in emit_indirect() 373 bytes[i++] = modrm; in emit_indirect()
|
A D | uprobes.c | 44 #define MODRM_REG(insn) X86_MODRM_REG((insn)->modrm.value)
|
/linux/tools/objtool/arch/x86/ |
A D | decode.c | 117 modrm = 0, modrm_mod = 0, modrm_rm = 0, modrm_reg = 0, in arch_decode_instruction() local 151 if (insn.modrm.nbytes) { in arch_decode_instruction() 152 modrm = insn.modrm.bytes[0]; in arch_decode_instruction() 153 modrm_mod = X86_MODRM_MOD(modrm); in arch_decode_instruction() 154 modrm_reg = X86_MODRM_REG(modrm) + 8*rex_r; in arch_decode_instruction() 155 modrm_rm = X86_MODRM_RM(modrm) + 8*rex_b; in arch_decode_instruction() 469 if (modrm == 0xca) in arch_decode_instruction() 471 else if (modrm == 0xcb) in arch_decode_instruction()
|
/linux/tools/perf/util/intel-pt-decoder/ |
A D | intel-pt-insn-decoder.c | 47 switch (insn->modrm.bytes[0]) { in intel_pt_insn_decoder() 120 ext = (insn->modrm.bytes[0] >> 3) & 0x7; in intel_pt_insn_decoder()
|
/linux/arch/x86/kernel/kprobes/ |
A D | core.c | 186 return X86_MODRM_REG(insn->modrm.bytes[0]) == 4; in can_boost() 636 X86_MODRM_REG(insn->modrm.bytes[0]) == 0 && in prepare_emulation() 637 X86_MODRM_MOD(insn->modrm.bytes[0]) == 3) { in prepare_emulation() 656 opcode = insn->modrm.bytes[0]; in prepare_emulation()
|
A D | opt.c | 224 (X86_MODRM_REG(insn->modrm.value) & 6) == 4) || /* Jump */ in __insn_is_indirect_jump()
|
/linux/arch/x86/tools/ |
A D | insn_decoder_test.c | 77 dump_field(fp, "modrm", "\t", &insn->modrm); in dump_insn()
|
A D | insn_sanity.c | 70 dump_field(fp, "modrm", "\t", &insn->modrm); in dump_insn()
|
/linux/arch/x86/kvm/ |
A D | emulate.c | 1174 ctxt->modrm_mod = (ctxt->modrm & 0xc0) >> 6; in decode_modrm() 1175 ctxt->modrm_reg |= (ctxt->modrm & 0x38) >> 3; in decode_modrm() 1176 ctxt->modrm_rm = base_reg | (ctxt->modrm & 0x07); in decode_modrm() 5160 ctxt->modrm = insn_fetch(u8, ctxt); in x86_decode_insn() 5171 goffset = (ctxt->modrm >> 3) & 7; in x86_decode_insn() 5175 goffset = (ctxt->modrm >> 3) & 7; in x86_decode_insn() 5176 if ((ctxt->modrm >> 6) == 3) in x86_decode_insn() 5182 goffset = ctxt->modrm & 7; in x86_decode_insn() 5197 if (ctxt->modrm > 0xbf) { in x86_decode_insn() 5200 ctxt->modrm - 0xc0, size); in x86_decode_insn() [all …]
|
A D | kvm_emulate.h | 353 u8 modrm; member
|
/linux/arch/x86/events/intel/ |
A D | lbr.c | 1291 ext = (insn.modrm.bytes[0] >> 3) & 0x7; in branch_type()
|
/linux/arch/x86/kvm/svm/ |
A D | svm.c | 2247 switch (ctxt->modrm) { in svm_instr_opcode()
|