Documentation ¶
Overview ¶
Package x86 allows to generate and mutate x86 machine code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Insn ¶
type Insn struct { Name string Extension string Mode iset.Mode // bitmask of compatible modes Priv bool // CPL=0 Pseudo bool // pseudo instructions can consist of several real instructions Opcode []byte Prefix []byte Suffix []byte Modrm bool Mod int8 Reg int8 // -6 - segment register, -8 - control register Rm int8 Srm bool // register is embed in the first byte NoSibDisp bool // no SIB/disp even if modrm says otherwise Imm int8 // immediate size, -1 - immediate size, -2 - address size, -3 - operand size Imm2 int8 NoRepPrefix bool No66Prefix bool Rexw int8 // 1 must be set, -1 must not be set Mem32 bool // instruction always references 32-bit memory operand, 0x67 is illegal Mem16 bool // instruction always references 16-bit memory operand Vex byte VexMap byte VexL int8 VexNoR bool VexP int8 Avx2Gather bool // contains filtered or unexported fields }
type InsnSet ¶
type InsnSet struct { Insns []*Insn // contains filtered or unexported fields }
func (*InsnSet) Decode ¶
Decode decodes instruction length for the given mode. It can have falsely decode incorrect instructions, but should not fail to decode correct instructions. nolint: gocyclo, nestif, gocognit, funlen
Click to show internal directories.
Click to hide internal directories.