Home
last modified time | relevance | path

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

/linux-6.1.9/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.1.9/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.1.9/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.1.9/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.1.9/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.c350 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()
Duprobes.c44 #define MODRM_REG(insn) X86_MODRM_REG((insn)->modrm.value)
/linux-6.1.9/tools/objtool/arch/x86/
Ddecode.c129 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/
Dintel-pt-insn-decoder.c48 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/
Dcore.c186 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()
Dopt.c232 (X86_MODRM_REG(insn->modrm.value) & 6) == 4) || /* Jump */ in __insn_is_indirect_jump()
/linux-6.1.9/arch/x86/events/
Dutils.c53 ext = (insn->modrm.bytes[0] >> 3) & 0x7; in decode_branch_type()
/linux-6.1.9/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.1.9/arch/x86/kvm/
Dkvm_emulate.h365 u8 modrm; member
Demulate.c1217 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/
Dsvm.c2232 switch (ctxt->modrm) { in svm_instr_opcode()