/linux-6.1.9/tools/arch/x86/lib/ |
D | insn.c | 335 struct insn_field *modrm = &insn->modrm; in insn_get_modrm() local 339 if (modrm->got) in insn_get_modrm() 350 insn_field_set(modrm, mod, 1); 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() [all …]
|
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-6.1.9/arch/x86/lib/ |
D | insn.c | 335 struct insn_field *modrm = &insn->modrm; in insn_get_modrm() local 339 if (modrm->got) in insn_get_modrm() 350 insn_field_set(modrm, mod, 1); 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() [all …]
|
D | insn-eval.c | 461 regno = X86_MODRM_RM(insn->modrm.value); in get_regno() 467 if (!X86_MODRM_MOD(insn->modrm.value) && regno == 5) in get_regno() 475 regno = X86_MODRM_REG(insn->modrm.value); in get_regno() 492 if (X86_MODRM_MOD(insn->modrm.value) != 3 && regno == 4) in get_regno() 503 if (!X86_MODRM_MOD(insn->modrm.value) && regno == 5) in get_regno() 584 if (X86_MODRM_MOD(insn->modrm.value) == 3) { in get_reg_offset_16() 590 *offs1 = regoff1[X86_MODRM_RM(insn->modrm.value)]; in get_reg_offset_16() 591 *offs2 = regoff2[X86_MODRM_RM(insn->modrm.value)]; in get_reg_offset_16() 600 if ((X86_MODRM_MOD(insn->modrm.value) == 0) && in get_reg_offset_16() 601 (X86_MODRM_RM(insn->modrm.value) == 6)) in get_reg_offset_16() [all …]
|
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-6.1.9/tools/arch/x86/include/asm/ |
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()
|
D | inat.h | 102 extern insn_attr_t inat_get_group_attribute(insn_byte_t modrm,
|
/linux-6.1.9/arch/x86/include/asm/ |
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()
|
D | inat.h | 102 extern insn_attr_t inat_get_group_attribute(insn_byte_t modrm,
|
/linux-6.1.9/arch/x86/kernel/ |
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()
|
D | alternative.c | 350 u8 modrm; in emit_indirect() local 354 modrm = 0x10; /* Reg = 2; CALL r/m */ in emit_indirect() 358 modrm = 0x20; /* Reg = 4; JMP r/m */ in emit_indirect() 371 modrm |= 0xc0; /* Mod = 3 */ in emit_indirect() 372 modrm += reg; in emit_indirect() 375 bytes[i++] = modrm; in emit_indirect()
|
D | uprobes.c | 44 #define MODRM_REG(insn) X86_MODRM_REG((insn)->modrm.value)
|
/linux-6.1.9/tools/objtool/arch/x86/ |
D | decode.c | 129 modrm = 0, modrm_mod = 0, modrm_rm = 0, modrm_reg = 0, in arch_decode_instruction() local 166 if (insn.modrm.nbytes) { in arch_decode_instruction() 167 modrm = insn.modrm.bytes[0]; in arch_decode_instruction() 168 modrm_mod = X86_MODRM_MOD(modrm); in arch_decode_instruction() 169 modrm_reg = X86_MODRM_REG(modrm) + 8*rex_r; in arch_decode_instruction() 170 modrm_rm = X86_MODRM_RM(modrm) + 8*rex_b; in arch_decode_instruction() 484 if (modrm == 0xca) in arch_decode_instruction() 486 else if (modrm == 0xcb) in arch_decode_instruction() 511 if (prefix == 0xf3 && (modrm == 0xfa || modrm == 0xfb)) in arch_decode_instruction()
|
/linux-6.1.9/tools/perf/util/intel-pt-decoder/ |
D | intel-pt-insn-decoder.c | 48 switch (insn->modrm.bytes[0]) { in intel_pt_insn_decoder() 121 ext = (insn->modrm.bytes[0] >> 3) & 0x7; in intel_pt_insn_decoder()
|
/linux-6.1.9/arch/x86/kernel/kprobes/ |
D | core.c | 186 return X86_MODRM_REG(insn->modrm.bytes[0]) == 4; in can_boost() 648 X86_MODRM_REG(insn->modrm.bytes[0]) == 0 && in prepare_emulation() 649 X86_MODRM_MOD(insn->modrm.bytes[0]) == 3) { in prepare_emulation() 668 opcode = insn->modrm.bytes[0]; in prepare_emulation()
|
D | opt.c | 232 (X86_MODRM_REG(insn->modrm.value) & 6) == 4) || /* Jump */ in __insn_is_indirect_jump()
|
/linux-6.1.9/arch/x86/events/ |
D | utils.c | 53 ext = (insn->modrm.bytes[0] >> 3) & 0x7; in decode_branch_type()
|
/linux-6.1.9/arch/x86/tools/ |
D | insn_decoder_test.c | 77 dump_field(fp, "modrm", "\t", &insn->modrm); in dump_insn()
|
D | insn_sanity.c | 70 dump_field(fp, "modrm", "\t", &insn->modrm); in dump_insn()
|
/linux-6.1.9/arch/x86/kvm/ |
D | kvm_emulate.h | 365 u8 modrm; member
|
D | emulate.c | 1217 ctxt->modrm_mod = (ctxt->modrm & 0xc0) >> 6; in decode_modrm() 1218 ctxt->modrm_reg |= (ctxt->modrm & 0x38) >> 3; in decode_modrm() 1219 ctxt->modrm_rm = base_reg | (ctxt->modrm & 0x07); in decode_modrm() 5242 ctxt->modrm = insn_fetch(u8, ctxt); in x86_decode_insn() 5246 (mode == X86EMUL_MODE_PROT64 || (ctxt->modrm & 0xc0) == 0xc0)) { in x86_decode_insn() 5253 goffset = (ctxt->modrm >> 3) & 7; in x86_decode_insn() 5257 goffset = (ctxt->modrm >> 3) & 7; in x86_decode_insn() 5258 if ((ctxt->modrm >> 6) == 3) in x86_decode_insn() 5264 goffset = ctxt->modrm & 7; in x86_decode_insn() 5279 if (ctxt->modrm > 0xbf) { in x86_decode_insn() [all …]
|
/linux-6.1.9/arch/x86/kvm/svm/ |
D | svm.c | 2232 switch (ctxt->modrm) { in svm_instr_opcode()
|