1 #ifndef _ASM_X86_INAT_H 2 #define _ASM_X86_INAT_H 30 #define INAT_OPCODE_TABLE_SIZE 256 31 #define INAT_GROUP_TABLE_SIZE 8 34 #define INAT_PFX_OPNDSZ 1 35 #define INAT_PFX_REPE 2 36 #define INAT_PFX_REPNE 3 38 #define INAT_PFX_LOCK 4 44 #define INAT_PFX_SS 10 45 #define INAT_PFX_ADDRSZ 11 47 #define INAT_PFX_REX 12 49 #define INAT_PFX_VEX2 13 50 #define INAT_PFX_VEX3 14 51 #define INAT_PFX_EVEX 15 53 #define INAT_LSTPFX_MAX 3 54 #define INAT_LGCPFX_MAX 11 57 #define INAT_IMM_BYTE 1 58 #define INAT_IMM_WORD 2 59 #define INAT_IMM_DWORD 3 60 #define INAT_IMM_QWORD 4 61 #define INAT_IMM_PTR 5 62 #define INAT_IMM_VWORD32 6 63 #define INAT_IMM_VWORD 7 66 #define INAT_PFX_OFFS 0 67 #define INAT_PFX_BITS 4 68 #define INAT_PFX_MAX ((1 << INAT_PFX_BITS) - 1) 69 #define INAT_PFX_MASK (INAT_PFX_MAX << INAT_PFX_OFFS) 71 #define INAT_ESC_OFFS (INAT_PFX_OFFS + INAT_PFX_BITS) 72 #define INAT_ESC_BITS 2 73 #define INAT_ESC_MAX ((1 << INAT_ESC_BITS) - 1) 74 #define INAT_ESC_MASK (INAT_ESC_MAX << INAT_ESC_OFFS) 76 #define INAT_GRP_OFFS (INAT_ESC_OFFS + INAT_ESC_BITS) 77 #define INAT_GRP_BITS 5 78 #define INAT_GRP_MAX ((1 << INAT_GRP_BITS) - 1) 79 #define INAT_GRP_MASK (INAT_GRP_MAX << INAT_GRP_OFFS) 81 #define INAT_IMM_OFFS (INAT_GRP_OFFS + INAT_GRP_BITS) 82 #define INAT_IMM_BITS 3 83 #define INAT_IMM_MASK (((1 << INAT_IMM_BITS) - 1) << INAT_IMM_OFFS) 85 #define INAT_FLAG_OFFS (INAT_IMM_OFFS + INAT_IMM_BITS) 86 #define INAT_MODRM (1 << (INAT_FLAG_OFFS)) 87 #define INAT_FORCE64 (1 << (INAT_FLAG_OFFS + 1)) 88 #define INAT_SCNDIMM (1 << (INAT_FLAG_OFFS + 2)) 89 #define INAT_MOFFSET (1 << (INAT_FLAG_OFFS + 3)) 90 #define INAT_VARIANT (1 << (INAT_FLAG_OFFS + 4)) 91 #define INAT_VEXOK (1 << (INAT_FLAG_OFFS + 5)) 92 #define INAT_VEXONLY (1 << (INAT_FLAG_OFFS + 6)) 93 #define INAT_EVEXONLY (1 << (INAT_FLAG_OFFS + 7)) 95 #define INAT_MAKE_PREFIX(pfx) (pfx << INAT_PFX_OFFS) 96 #define INAT_MAKE_ESCAPE(esc) (esc << INAT_ESC_OFFS) 97 #define INAT_MAKE_GROUP(grp) ((grp << INAT_GRP_OFFS) | INAT_MODRM) 98 #define INAT_MAKE_IMM(imm) (imm << INAT_IMM_OFFS) 101 #define INAT_SEG_REG_IGNORE 0 102 #define INAT_SEG_REG_DEFAULT 1 103 #define INAT_SEG_REG_CS 2 104 #define INAT_SEG_REG_SS 3 105 #define INAT_SEG_REG_DS 4 106 #define INAT_SEG_REG_ES 5 107 #define INAT_SEG_REG_FS 6 108 #define INAT_SEG_REG_GS 7
static int inat_has_variant(insn_attr_t attr)
static int inat_accept_vex(insn_attr_t attr)
static int inat_escape_id(insn_attr_t attr)
static int inat_has_immediate(insn_attr_t attr)
insn_attr_t inat_get_opcode_attribute(insn_byte_t opcode)
static int inat_is_operand_size_prefix(insn_attr_t attr)
static int inat_is_vex3_prefix(insn_attr_t attr)
static int inat_is_legacy_prefix(insn_attr_t attr)
insn_attr_t inat_get_avx_attribute(insn_byte_t opcode, insn_byte_t vex_m, insn_byte_t vex_pp)
static int inat_is_evex_prefix(insn_attr_t attr)
static int inat_is_group(insn_attr_t attr)
static int inat_has_second_immediate(insn_attr_t attr)
static int inat_is_rex_prefix(insn_attr_t attr)
unsigned char insn_byte_t
static int inat_is_escape(insn_attr_t attr)
static int inat_must_evex(insn_attr_t attr)
int inat_get_last_prefix_id(insn_byte_t last_pfx)
static int inat_group_id(insn_attr_t attr)
static int inat_has_modrm(insn_attr_t attr)
insn_attr_t inat_get_group_attribute(insn_byte_t modrm, int lpfx_id, insn_attr_t esc_attr)
static int inat_is_force64(insn_attr_t attr)
static int inat_last_prefix_id(insn_attr_t attr)
static int inat_has_moffset(insn_attr_t attr)
static int inat_is_address_size_prefix(insn_attr_t attr)
insn_attr_t inat_get_escape_attribute(insn_byte_t opcode, int lpfx_id, insn_attr_t esc_attr)
static int inat_group_common_attribute(insn_attr_t attr)
static int inat_is_vex_prefix(insn_attr_t attr)
static int inat_must_vex(insn_attr_t attr)
static int inat_immediate_size(insn_attr_t attr)