Home
last modified time | relevance | path

Searched refs:modrm (Results 1 – 22 of 22) sorted by relevance

/linux-6.6.21/arch/x86/lib/
Dinsn.c335 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 …]
Dinsn-eval.c461 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 …]
Dinat.c45 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.6.21/tools/arch/x86/lib/
Dinsn.c335 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 …]
Dinat.c45 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.6.21/tools/arch/x86/include/asm/
Dinsn.h80 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()
Dinat.h102 extern insn_attr_t inat_get_group_attribute(insn_byte_t modrm,
/linux-6.6.21/arch/x86/include/asm/
Dinsn.h80 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()
Dinat.h102 extern insn_attr_t inat_get_group_attribute(insn_byte_t modrm,
/linux-6.6.21/arch/x86/kernel/
Dumip.c156 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()
Dalternative.c494 u8 modrm; in emit_indirect() local
498 modrm = 0x10; /* Reg = 2; CALL r/m */ in emit_indirect()
502 modrm = 0x20; /* Reg = 4; JMP r/m */ in emit_indirect()
515 modrm |= 0xc0; /* Mod = 3 */ in emit_indirect()
516 modrm += reg; in emit_indirect()
519 bytes[i++] = modrm; in emit_indirect()
Duprobes.c44 #define MODRM_REG(insn) X86_MODRM_REG((insn)->modrm.value)
/linux-6.6.21/tools/objtool/arch/x86/
Ddecode.c157 modrm = 0, modrm_mod = 0, modrm_rm = 0, modrm_reg = 0, in arch_decode_instruction() local
194 if (ins.modrm.nbytes) { in arch_decode_instruction()
195 modrm = ins.modrm.bytes[0]; in arch_decode_instruction()
196 modrm_mod = X86_MODRM_MOD(modrm); in arch_decode_instruction()
197 modrm_reg = X86_MODRM_REG(modrm) + 8*rex_r; in arch_decode_instruction()
198 modrm_rm = X86_MODRM_RM(modrm) + 8*rex_b; in arch_decode_instruction()
512 if (modrm == 0xca) in arch_decode_instruction()
514 else if (modrm == 0xcb) in arch_decode_instruction()
539 if (prefix == 0xf3 && (modrm == 0xfa || modrm == 0xfb)) in arch_decode_instruction()
/linux-6.6.21/tools/perf/util/intel-pt-decoder/
Dintel-pt-insn-decoder.c49 switch (insn->modrm.bytes[0]) { in intel_pt_insn_decoder()
136 ext = (insn->modrm.bytes[0] >> 3) & 0x7; in intel_pt_insn_decoder()
/linux-6.6.21/arch/x86/kernel/kprobes/
Dcore.c187 return X86_MODRM_REG(insn->modrm.bytes[0]) == 4; in can_boost()
654 X86_MODRM_REG(insn->modrm.bytes[0]) == 0 && in prepare_emulation()
655 X86_MODRM_MOD(insn->modrm.bytes[0]) == 3) { in prepare_emulation()
674 opcode = insn->modrm.bytes[0]; in prepare_emulation()
Dopt.c232 (X86_MODRM_REG(insn->modrm.value) & 6) == 4) || /* Jump */ in insn_is_indirect_jump()
/linux-6.6.21/arch/x86/events/
Dutils.c54 ext = (insn->modrm.bytes[0] >> 3) & 0x7; in decode_branch_type()
/linux-6.6.21/arch/x86/tools/
Dinsn_decoder_test.c77 dump_field(fp, "modrm", "\t", &insn->modrm); in dump_insn()
Dinsn_sanity.c70 dump_field(fp, "modrm", "\t", &insn->modrm); in dump_insn()
/linux-6.6.21/arch/x86/kvm/
Demulate.c1187 ctxt->modrm_mod = (ctxt->modrm & 0xc0) >> 6; in decode_modrm()
1188 ctxt->modrm_reg |= (ctxt->modrm & 0x38) >> 3; in decode_modrm()
1189 ctxt->modrm_rm = base_reg | (ctxt->modrm & 0x07); in decode_modrm()
4898 ctxt->modrm = insn_fetch(u8, ctxt); in x86_decode_insn()
4902 (mode == X86EMUL_MODE_PROT64 || (ctxt->modrm & 0xc0) == 0xc0)) { in x86_decode_insn()
4909 goffset = (ctxt->modrm >> 3) & 7; in x86_decode_insn()
4913 goffset = (ctxt->modrm >> 3) & 7; in x86_decode_insn()
4914 if ((ctxt->modrm >> 6) == 3) in x86_decode_insn()
4920 goffset = ctxt->modrm & 7; in x86_decode_insn()
4935 if (ctxt->modrm > 0xbf) { in x86_decode_insn()
[all …]
Dkvm_emulate.h346 u8 modrm; member
/linux-6.6.21/arch/x86/kvm/svm/
Dsvm.c2337 switch (ctxt->modrm) { in svm_instr_opcode()