Home
last modified time | relevance | path

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

/arch/x86/include/asm/
Dinsn.h35 struct insn_field modrm; member
62 #define X86_MODRM_MOD(modrm) (((modrm) & 0xc0) >> 6) argument
63 #define X86_MODRM_REG(modrm) (((modrm) & 0x38) >> 3) argument
64 #define X86_MODRM_RM(modrm) ((modrm) & 0x07) argument
152 return insn->opcode.got && insn->modrm.got && insn->sib.got && in insn_complete()
205 return insn_offset_modrm(insn) + insn->modrm.nbytes; in insn_offset_sib()
246 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,
/arch/x86/lib/
Dinsn.c320 struct insn_field *modrm = &insn->modrm; in insn_get_modrm() local
324 if (modrm->got) in insn_get_modrm()
335 modrm->value = mod; in insn_get_modrm()
336 modrm->nbytes = 1; in insn_get_modrm()
352 modrm->got = 1; in insn_get_modrm()
369 struct insn_field *modrm = &insn->modrm; in insn_rip_relative() local
375 if (!modrm->got) { in insn_rip_relative()
384 return (modrm->nbytes && (modrm->value & 0xc7) == 0x5); in insn_rip_relative()
400 insn_byte_t modrm; in insn_get_sib() local
406 if (!insn->modrm.got) { in insn_get_sib()
[all …]
Dinsn-eval.c454 regno = X86_MODRM_RM(insn->modrm.value); in get_reg_offset()
460 if (!X86_MODRM_MOD(insn->modrm.value) && regno == 5) in get_reg_offset()
468 regno = X86_MODRM_REG(insn->modrm.value); in get_reg_offset()
485 if (X86_MODRM_MOD(insn->modrm.value) != 3 && regno == 4) in get_reg_offset()
496 if (!X86_MODRM_MOD(insn->modrm.value) && regno == 5) in get_reg_offset()
566 if (X86_MODRM_MOD(insn->modrm.value) == 3) { in get_reg_offset_16()
572 *offs1 = regoff1[X86_MODRM_RM(insn->modrm.value)]; in get_reg_offset_16()
573 *offs2 = regoff2[X86_MODRM_RM(insn->modrm.value)]; in get_reg_offset_16()
582 if ((X86_MODRM_MOD(insn->modrm.value) == 0) && in get_reg_offset_16()
583 (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()
/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()
381 if (X86_MODRM_MOD(insn.modrm.value) == 3) { in fixup_umip_exception()
Dalternative.c517 u8 modrm; in emit_indirect() local
521 modrm = 0x10; /* Reg = 2; CALL r/m */ in emit_indirect()
525 modrm = 0x20; /* Reg = 4; JMP r/m */ in emit_indirect()
538 modrm |= 0xc0; /* Mod = 3 */ in emit_indirect()
539 modrm += reg; in emit_indirect()
542 bytes[i++] = modrm; in emit_indirect()
Duprobes.c44 #define MODRM_REG(insn) X86_MODRM_REG((insn)->modrm.value)
/arch/x86/tools/
Dinsn_decoder_test.c77 dump_field(fp, "modrm", "\t", &insn->modrm); in dump_insn()
Dinsn_sanity.c74 dump_field(fp, "modrm", "\t", &insn->modrm); in dump_insn()
/arch/x86/kernel/kprobes/
Dcore.c187 return X86_MODRM_REG(insn->modrm.bytes[0]) == 4; in can_boost()
647 X86_MODRM_REG(insn->modrm.bytes[0]) == 0 && in prepare_emulation()
648 X86_MODRM_MOD(insn->modrm.bytes[0]) == 3) { in prepare_emulation()
667 opcode = insn->modrm.bytes[0]; in prepare_emulation()
Dopt.c230 (X86_MODRM_REG(insn->modrm.value) & 6) == 4) || /* Jump */ in __insn_is_indirect_jump()
/arch/x86/kvm/
Dkvm_emulate.h357 u8 modrm; member
Demulate.c1322 ctxt->modrm_mod = (ctxt->modrm & 0xc0) >> 6; in decode_modrm()
1323 ctxt->modrm_reg |= (ctxt->modrm & 0x38) >> 3; in decode_modrm()
1324 ctxt->modrm_rm = base_reg | (ctxt->modrm & 0x07); in decode_modrm()
5316 ctxt->modrm = insn_fetch(u8, ctxt); in x86_decode_insn()
5320 (mode == X86EMUL_MODE_PROT64 || (ctxt->modrm & 0xc0) == 0xc0)) { in x86_decode_insn()
5327 goffset = (ctxt->modrm >> 3) & 7; in x86_decode_insn()
5331 goffset = (ctxt->modrm >> 3) & 7; in x86_decode_insn()
5332 if ((ctxt->modrm >> 6) == 3) in x86_decode_insn()
5338 goffset = ctxt->modrm & 7; in x86_decode_insn()
5353 if (ctxt->modrm > 0xbf) { in x86_decode_insn()
[all …]
/arch/x86/kernel/cpu/mce/
Dseverity.c239 if (!insn.modrm.got || !insn.sib.got) in is_copy_from_user()
/arch/x86/events/intel/
Dlbr.c1307 ext = (insn.modrm.bytes[0] >> 3) & 0x7; in branch_type()