x86asm

Imports

Imports #

"fmt"
"strings"
"encoding/binary"
"errors"
"fmt"
"runtime"
"fmt"
"strings"
"bytes"
"fmt"
"fmt"
"strings"

Constants & Variables

AAA const #

const AAA

AAD const #

const AAD

AAM const #

const AAM

AAS const #

const AAS

ADC const #

const ADC

ADD const #

const ADD

ADDPD const #

const ADDPD

ADDPS const #

const ADDPS

ADDSD const #

const ADDSD

ADDSS const #

const ADDSS

ADDSUBPD const #

const ADDSUBPD

ADDSUBPS const #

const ADDSUBPS

AESDEC const #

const AESDEC

AESDECLAST const #

const AESDECLAST

AESENC const #

const AESENC

AESENCLAST const #

const AESENCLAST

AESIMC const #

const AESIMC

AESKEYGENASSIST const #

const AESKEYGENASSIST

AH const #

const AH

AL const #

8-bit

const AL

AND const #

const AND

ANDNPD const #

const ANDNPD

ANDNPS const #

const ANDNPS

ANDPD const #

const ANDPD

ANDPS const #

const ANDPS

ARPL const #

const ARPL

AX const #

16-bit

const AX

BH const #

const BH

BL const #

const BL

BLENDPD const #

const BLENDPD

BLENDPS const #

const BLENDPS

BLENDVPD const #

const BLENDVPD

BLENDVPS const #

const BLENDVPS

BOUND const #

const BOUND

BP const #

const BP

BPB const #

const BPB

BSF const #

const BSF

BSR const #

const BSR

BSWAP const #

const BSWAP

BT const #

const BT

BTC const #

const BTC

BTR const #

const BTR

BTS const #

const BTS

BX const #

const BX

CALL const #

const CALL

CBW const #

const CBW

CDQ const #

const CDQ

CDQE const #

const CDQE

CH const #

const CH

CL const #

const CL

CLC const #

const CLC

CLD const #

const CLD

CLFLUSH const #

const CLFLUSH

CLI const #

const CLI

CLTS const #

const CLTS

CMC const #

const CMC

CMOVA const #

const CMOVA

CMOVAE const #

const CMOVAE

CMOVB const #

const CMOVB

CMOVBE const #

const CMOVBE

CMOVE const #

const CMOVE

CMOVG const #

const CMOVG

CMOVGE const #

const CMOVGE

CMOVL const #

const CMOVL

CMOVLE const #

const CMOVLE

CMOVNE const #

const CMOVNE

CMOVNO const #

const CMOVNO

CMOVNP const #

const CMOVNP

CMOVNS const #

const CMOVNS

CMOVO const #

const CMOVO

CMOVP const #

const CMOVP

CMOVS const #

const CMOVS

CMP const #

const CMP

CMPPD const #

const CMPPD

CMPPS const #

const CMPPS

CMPSB const #

const CMPSB

CMPSD const #

const CMPSD

CMPSD_XMM const #

const CMPSD_XMM

CMPSQ const #

const CMPSQ

CMPSS const #

const CMPSS

CMPSW const #

const CMPSW

CMPXCHG const #

const CMPXCHG

CMPXCHG16B const #

const CMPXCHG16B

CMPXCHG8B const #

const CMPXCHG8B

COMISD const #

const COMISD

COMISS const #

const COMISS

CPUID const #

const CPUID

CQO const #

const CQO

CR0 const #

Control registers.

const CR0

CR1 const #

const CR1

CR10 const #

const CR10

CR11 const #

const CR11

CR12 const #

const CR12

CR13 const #

const CR13

CR14 const #

const CR14

CR15 const #

const CR15

CR2 const #

const CR2

CR3 const #

const CR3

CR4 const #

const CR4

CR5 const #

const CR5

CR6 const #

const CR6

CR7 const #

const CR7

CR8 const #

const CR8

CR9 const #

const CR9

CRC32 const #

const CRC32

CS const #

const CS

CVTDQ2PD const #

const CVTDQ2PD

CVTDQ2PS const #

const CVTDQ2PS

CVTPD2DQ const #

const CVTPD2DQ

CVTPD2PI const #

const CVTPD2PI

CVTPD2PS const #

const CVTPD2PS

CVTPI2PD const #

const CVTPI2PD

CVTPI2PS const #

const CVTPI2PS

CVTPS2DQ const #

const CVTPS2DQ

CVTPS2PD const #

const CVTPS2PD

CVTPS2PI const #

const CVTPS2PI

CVTSD2SI const #

const CVTSD2SI

CVTSD2SS const #

const CVTSD2SS

CVTSI2SD const #

const CVTSI2SD

CVTSI2SS const #

const CVTSI2SS

CVTSS2SD const #

const CVTSS2SD

CVTSS2SI const #

const CVTSS2SI

CVTTPD2DQ const #

const CVTTPD2DQ

CVTTPD2PI const #

const CVTTPD2PI

CVTTPS2DQ const #

const CVTTPS2DQ

CVTTPS2PI const #

const CVTTPS2PI

CVTTSD2SI const #

const CVTTSD2SI

CVTTSS2SI const #

const CVTTSS2SI

CWD const #

const CWD

CWDE const #

const CWDE

CX const #

const CX

DAA const #

const DAA

DAS const #

const DAS

DEC const #

const DEC

DH const #

const DH

DI const #

const DI

DIB const #

const DIB

DIV const #

const DIV

DIVPD const #

const DIVPD

DIVPS const #

const DIVPS

DIVSD const #

const DIVSD

DIVSS const #

const DIVSS

DL const #

const DL

DPPD const #

const DPPD

DPPS const #

const DPPS

DR0 const #

Debug registers.

const DR0

DR1 const #

const DR1

DR10 const #

const DR10

DR11 const #

const DR11

DR12 const #

const DR12

DR13 const #

const DR13

DR14 const #

const DR14

DR15 const #

const DR15

DR2 const #

const DR2

DR3 const #

const DR3

DR4 const #

const DR4

DR5 const #

const DR5

DR6 const #

const DR6

DR7 const #

const DR7

DR8 const #

const DR8

DR9 const #

const DR9

DS const #

const DS

DX const #

const DX

EAX const #

32-bit

const EAX

EBP const #

const EBP

EBX const #

const EBX

ECX const #

const ECX

EDI const #

const EDI

EDX const #

const EDX

EIP const #

const EIP

EMMS const #

const EMMS

ENTER const #

const ENTER

ES const #

Segment registers.

const ES

ESI const #

const ESI

ESP const #

const ESP

EXTRACTPS const #

const EXTRACTPS

ErrInvalidMode var #

These are the errors returned by Decode.

var ErrInvalidMode = *ast.CallExpr

ErrTruncated var #

These are the errors returned by Decode.

var ErrTruncated = *ast.CallExpr

ErrUnrecognized var #

These are the errors returned by Decode.

var ErrUnrecognized = *ast.CallExpr

F0 const #

387 floating point registers.

const F0

F1 const #

const F1

F2 const #

const F2

F2XM1 const #

const F2XM1

F3 const #

const F3

F4 const #

const F4

F5 const #

const F5

F6 const #

const F6

F7 const #

const F7

FABS const #

const FABS

FADD const #

const FADD

FADDP const #

const FADDP

FBLD const #

const FBLD

FBSTP const #

const FBSTP

FCHS const #

const FCHS

FCMOVB const #

const FCMOVB

FCMOVBE const #

const FCMOVBE

FCMOVE const #

const FCMOVE

FCMOVNB const #

const FCMOVNB

FCMOVNBE const #

const FCMOVNBE

FCMOVNE const #

const FCMOVNE

FCMOVNU const #

const FCMOVNU

FCMOVU const #

const FCMOVU

FCOM const #

const FCOM

FCOMI const #

const FCOMI

FCOMIP const #

const FCOMIP

FCOMP const #

const FCOMP

FCOMPP const #

const FCOMPP

FCOS const #

const FCOS

FDECSTP const #

const FDECSTP

FDIV const #

const FDIV

FDIVP const #

const FDIVP

FDIVR const #

const FDIVR

FDIVRP const #

const FDIVRP

FFREE const #

const FFREE

FFREEP const #

const FFREEP

FIADD const #

const FIADD

FICOM const #

const FICOM

FICOMP const #

const FICOMP

FIDIV const #

const FIDIV

FIDIVR const #

const FIDIVR

FILD const #

const FILD

FIMUL const #

const FIMUL

FINCSTP const #

const FINCSTP

FIST const #

const FIST

FISTP const #

const FISTP

FISTTP const #

const FISTTP

FISUB const #

const FISUB

FISUBR const #

const FISUBR

FLD const #

const FLD

FLD1 const #

const FLD1

FLDCW const #

const FLDCW

FLDENV const #

const FLDENV

FLDL2E const #

const FLDL2E

FLDL2T const #

const FLDL2T

FLDLG2 const #

const FLDLG2

FLDLN2 const #

const FLDLN2

FLDPI const #

const FLDPI

FLDZ const #

const FLDZ

FMUL const #

const FMUL

FMULP const #

const FMULP

FNCLEX const #

const FNCLEX

FNINIT const #

const FNINIT

FNOP const #

const FNOP

FNSAVE const #

const FNSAVE

FNSTCW const #

const FNSTCW

FNSTENV const #

const FNSTENV

FNSTSW const #

const FNSTSW

FPATAN const #

const FPATAN

FPREM const #

const FPREM

FPREM1 const #

const FPREM1

FPTAN const #

const FPTAN

FRNDINT const #

const FRNDINT

FRSTOR const #

const FRSTOR

FS const #

const FS

FSCALE const #

const FSCALE

FSIN const #

const FSIN

FSINCOS const #

const FSINCOS

FSQRT const #

const FSQRT

FST const #

const FST

FSTP const #

const FSTP

FSUB const #

const FSUB

FSUBP const #

const FSUBP

FSUBR const #

const FSUBR

FSUBRP const #

const FSUBRP

FTST const #

const FTST

FUCOM const #

const FUCOM

FUCOMI const #

const FUCOMI

FUCOMIP const #

const FUCOMIP

FUCOMP const #

const FUCOMP

FUCOMPP const #

const FUCOMPP

FWAIT const #

const FWAIT

FXAM const #

const FXAM

FXCH const #

const FXCH

FXRSTOR const #

const FXRSTOR

FXRSTOR64 const #

const FXRSTOR64

FXSAVE const #

const FXSAVE

FXSAVE64 const #

const FXSAVE64

FXTRACT const #

const FXTRACT

FYL2X const #

const FYL2X

FYL2XP1 const #

const FYL2XP1

GDTR const #

System registers.

const GDTR

GS const #

const GS

HADDPD const #

const HADDPD

HADDPS const #

const HADDPS

HLT const #

const HLT

HSUBPD const #

const HSUBPD

HSUBPS const #

const HSUBPS

ICEBP const #

const ICEBP

IDIV const #

const IDIV

IDTR const #

const IDTR

IMUL const #

const IMUL

IN const #

const IN

INC const #

const INC

INSB const #

const INSB

INSD const #

const INSD

INSERTPS const #

const INSERTPS

INSW const #

const INSW

INT const #

const INT

INTO const #

const INTO

INVD const #

const INVD

INVLPG const #

const INVLPG

INVPCID const #

const INVPCID

IP const #

Instruction pointer.

const IP

IRET const #

const IRET

IRETD const #

const IRETD

IRETQ const #

const IRETQ

JA const #

const JA

JAE const #

const JAE

JB const #

const JB

JBE const #

const JBE

JCXZ const #

const JCXZ

JE const #

const JE

JECXZ const #

const JECXZ

JG const #

const JG

JGE const #

const JGE

JL const #

const JL

JLE const #

const JLE

JMP const #

const JMP

JNE const #

const JNE

JNO const #

const JNO

JNP const #

const JNP

JNS const #

const JNS

JO const #

const JO

JP const #

const JP

JRCXZ const #

const JRCXZ

JS const #

const JS

LAHF const #

const LAHF

LAR const #

const LAR

LCALL const #

const LCALL

LDDQU const #

const LDDQU

LDMXCSR const #

const LDMXCSR

LDS const #

const LDS

LDTR const #

const LDTR

LEA const #

const LEA

LEAVE const #

const LEAVE

LES const #

const LES

LFENCE const #

const LFENCE

LFS const #

const LFS

LGDT const #

const LGDT

LGS const #

const LGS

LIDT const #

const LIDT

LJMP const #

const LJMP

LLDT const #

const LLDT

LMSW const #

const LMSW

LODSB const #

const LODSB

LODSD const #

const LODSD

LODSQ const #

const LODSQ

LODSW const #

const LODSW

LOOP const #

const LOOP

LOOPE const #

const LOOPE

LOOPNE const #

const LOOPNE

LRET const #

const LRET

LSL const #

const LSL

LSS const #

const LSS

LTR const #

const LTR

LZCNT const #

const LZCNT

M0 const #

MMX registers.

const M0

M1 const #

const M1

M2 const #

const M2

M3 const #

const M3

M4 const #

const M4

M5 const #

const M5

M6 const #

const M6

M7 const #

const M7

MASKMOVDQU const #

const MASKMOVDQU

MASKMOVQ const #

const MASKMOVQ

MAXPD const #

const MAXPD

MAXPS const #

const MAXPS

MAXSD const #

const MAXSD

MAXSS const #

const MAXSS

MFENCE const #

const MFENCE

MINPD const #

const MINPD

MINPS const #

const MINPS

MINSD const #

const MINSD

MINSS const #

const MINSS

MONITOR const #

const MONITOR

MOV const #

const MOV

MOVAPD const #

const MOVAPD

MOVAPS const #

const MOVAPS

MOVBE const #

const MOVBE

MOVD const #

const MOVD

MOVDDUP const #

const MOVDDUP

MOVDQ2Q const #

const MOVDQ2Q

MOVDQA const #

const MOVDQA

MOVDQU const #

const MOVDQU

MOVHLPS const #

const MOVHLPS

MOVHPD const #

const MOVHPD

MOVHPS const #

const MOVHPS

MOVLHPS const #

const MOVLHPS

MOVLPD const #

const MOVLPD

MOVLPS const #

const MOVLPS

MOVMSKPD const #

const MOVMSKPD

MOVMSKPS const #

const MOVMSKPS

MOVNTDQ const #

const MOVNTDQ

MOVNTDQA const #

const MOVNTDQA

MOVNTI const #

const MOVNTI

MOVNTPD const #

const MOVNTPD

MOVNTPS const #

const MOVNTPS

MOVNTQ const #

const MOVNTQ

MOVNTSD const #

const MOVNTSD

MOVNTSS const #

const MOVNTSS

MOVQ const #

const MOVQ

MOVQ2DQ const #

const MOVQ2DQ

MOVSB const #

const MOVSB

MOVSD const #

const MOVSD

MOVSD_XMM const #

const MOVSD_XMM

MOVSHDUP const #

const MOVSHDUP

MOVSLDUP const #

const MOVSLDUP

MOVSQ const #

const MOVSQ

MOVSS const #

const MOVSS

MOVSW const #

const MOVSW

MOVSX const #

const MOVSX

MOVSXD const #

const MOVSXD

MOVUPD const #

const MOVUPD

MOVUPS const #

const MOVUPS

MOVZX const #

const MOVZX

MPSADBW const #

const MPSADBW

MSW const #

const MSW

MUL const #

const MUL

MULPD const #

const MULPD

MULPS const #

const MULPS

MULSD const #

const MULSD

MULSS const #

const MULSS

MWAIT const #

const MWAIT

NEG const #

const NEG

NOP const #

const NOP

NOT const #

const NOT

OR const #

const OR

ORPD const #

const ORPD

ORPS const #

const ORPS

OUT const #

const OUT

OUTSB const #

const OUTSB

OUTSD const #

const OUTSD

OUTSW const #

const OUTSW

PABSB const #

const PABSB

PABSD const #

const PABSD

PABSW const #

const PABSW

PACKSSDW const #

const PACKSSDW

PACKSSWB const #

const PACKSSWB

PACKUSDW const #

const PACKUSDW

PACKUSWB const #

const PACKUSWB

PADDB const #

const PADDB

PADDD const #

const PADDD

PADDQ const #

const PADDQ

PADDSB const #

const PADDSB

PADDSW const #

const PADDSW

PADDUSB const #

const PADDUSB

PADDUSW const #

const PADDUSW

PADDW const #

const PADDW

PALIGNR const #

const PALIGNR

PAND const #

const PAND

PANDN const #

const PANDN

PAUSE const #

const PAUSE

PAVGB const #

const PAVGB

PAVGW const #

const PAVGW

PBLENDVB const #

const PBLENDVB

PBLENDW const #

const PBLENDW

PCLMULQDQ const #

const PCLMULQDQ

PCMPEQB const #

const PCMPEQB

PCMPEQD const #

const PCMPEQD

PCMPEQQ const #

const PCMPEQQ

PCMPEQW const #

const PCMPEQW

PCMPESTRI const #

const PCMPESTRI

PCMPESTRM const #

const PCMPESTRM

PCMPGTB const #

const PCMPGTB

PCMPGTD const #

const PCMPGTD

PCMPGTQ const #

const PCMPGTQ

PCMPGTW const #

const PCMPGTW

PCMPISTRI const #

const PCMPISTRI

PCMPISTRM const #

const PCMPISTRM

PEXTRB const #

const PEXTRB

PEXTRD const #

const PEXTRD

PEXTRQ const #

const PEXTRQ

PEXTRW const #

const PEXTRW

PHADDD const #

const PHADDD

PHADDSW const #

const PHADDSW

PHADDW const #

const PHADDW

PHMINPOSUW const #

const PHMINPOSUW

PHSUBD const #

const PHSUBD

PHSUBSW const #

const PHSUBSW

PHSUBW const #

const PHSUBW

PINSRB const #

const PINSRB

PINSRD const #

const PINSRD

PINSRQ const #

const PINSRQ

PINSRW const #

const PINSRW

PMADDUBSW const #

const PMADDUBSW

PMADDWD const #

const PMADDWD

PMAXSB const #

const PMAXSB

PMAXSD const #

const PMAXSD

PMAXSW const #

const PMAXSW

PMAXUB const #

const PMAXUB

PMAXUD const #

const PMAXUD

PMAXUW const #

const PMAXUW

PMINSB const #

const PMINSB

PMINSD const #

const PMINSD

PMINSW const #

const PMINSW

PMINUB const #

const PMINUB

PMINUD const #

const PMINUD

PMINUW const #

const PMINUW

PMOVMSKB const #

const PMOVMSKB

PMOVSXBD const #

const PMOVSXBD

PMOVSXBQ const #

const PMOVSXBQ

PMOVSXBW const #

const PMOVSXBW

PMOVSXDQ const #

const PMOVSXDQ

PMOVSXWD const #

const PMOVSXWD

PMOVSXWQ const #

const PMOVSXWQ

PMOVZXBD const #

const PMOVZXBD

PMOVZXBQ const #

const PMOVZXBQ

PMOVZXBW const #

const PMOVZXBW

PMOVZXDQ const #

const PMOVZXDQ

PMOVZXWD const #

const PMOVZXWD

PMOVZXWQ const #

const PMOVZXWQ

PMULDQ const #

const PMULDQ

PMULHRSW const #

const PMULHRSW

PMULHUW const #

const PMULHUW

PMULHW const #

const PMULHW

PMULLD const #

const PMULLD

PMULLW const #

const PMULLW

PMULUDQ const #

const PMULUDQ

POP const #

const POP

POPA const #

const POPA

POPAD const #

const POPAD

POPCNT const #

const POPCNT

POPF const #

const POPF

POPFD const #

const POPFD

POPFQ const #

const POPFQ

POR const #

const POR

PREFETCHNTA const #

const PREFETCHNTA

PREFETCHT0 const #

const PREFETCHT0

PREFETCHT1 const #

const PREFETCHT1

PREFETCHT2 const #

const PREFETCHT2

PREFETCHW const #

const PREFETCHW

PSADBW const #

const PSADBW

PSHUFB const #

const PSHUFB

PSHUFD const #

const PSHUFD

PSHUFHW const #

const PSHUFHW

PSHUFLW const #

const PSHUFLW

PSHUFW const #

const PSHUFW

PSIGNB const #

const PSIGNB

PSIGND const #

const PSIGND

PSIGNW const #

const PSIGNW

PSLLD const #

const PSLLD

PSLLDQ const #

const PSLLDQ

PSLLQ const #

const PSLLQ

PSLLW const #

const PSLLW

PSRAD const #

const PSRAD

PSRAW const #

const PSRAW

PSRLD const #

const PSRLD

PSRLDQ const #

const PSRLDQ

PSRLQ const #

const PSRLQ

PSRLW const #

const PSRLW

PSUBB const #

const PSUBB

PSUBD const #

const PSUBD

PSUBQ const #

const PSUBQ

PSUBSB const #

const PSUBSB

PSUBSW const #

const PSUBSW

PSUBUSB const #

const PSUBUSB

PSUBUSW const #

const PSUBUSW

PSUBW const #

const PSUBW

PTEST const #

const PTEST

PUNPCKHBW const #

const PUNPCKHBW

PUNPCKHDQ const #

const PUNPCKHDQ

PUNPCKHQDQ const #

const PUNPCKHQDQ

PUNPCKHWD const #

const PUNPCKHWD

PUNPCKLBW const #

const PUNPCKLBW

PUNPCKLDQ const #

const PUNPCKLDQ

PUNPCKLQDQ const #

const PUNPCKLQDQ

PUNPCKLWD const #

const PUNPCKLWD

PUSH const #

const PUSH

PUSHA const #

const PUSHA

PUSHAD const #

const PUSHAD

PUSHF const #

const PUSHF

PUSHFD const #

const PUSHFD

PUSHFQ const #

const PUSHFQ

PXOR const #

const PXOR

PrefixAddr16 const #

const PrefixAddr16 Prefix = 0x167

PrefixAddr32 const #

const PrefixAddr32 Prefix = 0x267

PrefixAddrSize const #

const PrefixAddrSize Prefix = 0x67

PrefixBND const #

const PrefixBND Prefix = 0x2F2

PrefixCS const #

const PrefixCS Prefix = 0x2E

PrefixDS const #

const PrefixDS Prefix = 0x3E

PrefixData16 const #

const PrefixData16 Prefix = 0x166

PrefixData32 const #

const PrefixData32 Prefix = 0x266

PrefixDataSize const #

Size attributes.

const PrefixDataSize Prefix = 0x66

PrefixES const #

Memory segment overrides.

const PrefixES Prefix = 0x26

PrefixFS const #

const PrefixFS Prefix = 0x64

PrefixGS const #

const PrefixGS Prefix = 0x65

PrefixIgnored const #

const PrefixIgnored Prefix = 0x4000

PrefixImplicit const #

Metadata about the role of a prefix in an instruction.

const PrefixImplicit Prefix = 0x8000

PrefixInvalid const #

const PrefixInvalid Prefix = 0x2000

PrefixLOCK const #

One of a kind.

const PrefixLOCK Prefix = 0xF0

PrefixPN const #

Branch prediction.

const PrefixPN Prefix = 0x12E

PrefixPT const #

const PrefixPT Prefix = 0x13E

PrefixREP const #

const PrefixREP Prefix = 0xF3

PrefixREPN const #

const PrefixREPN Prefix = 0xF2

PrefixREX const #

The REX prefixes must be in the range [PrefixREX, PrefixREX+0x10). the other bits are set or not according to the intended use.

const PrefixREX Prefix = 0x40

PrefixREXB const #

const PrefixREXB Prefix = 0x01

PrefixREXR const #

const PrefixREXR Prefix = 0x04

PrefixREXW const #

const PrefixREXW Prefix = 0x08

PrefixREXX const #

const PrefixREXX Prefix = 0x02

PrefixSS const #

const PrefixSS Prefix = 0x36

PrefixVEX2Bytes const #

const PrefixVEX2Bytes Prefix = 0xC5

PrefixVEX3Bytes const #

const PrefixVEX3Bytes Prefix = 0xC4

PrefixXACQUIRE const #

const PrefixXACQUIRE Prefix = 0x1F2

PrefixXRELEASE const #

const PrefixXRELEASE Prefix = 0x1F3

R10 const #

const R10

R10B const #

const R10B

R10L const #

const R10L

R10W const #

const R10W

R11 const #

const R11

R11B const #

const R11B

R11L const #

const R11L

R11W const #

const R11W

R12 const #

const R12

R12B const #

const R12B

R12L const #

const R12L

R12W const #

const R12W

R13 const #

const R13

R13B const #

const R13B

R13L const #

const R13L

R13W const #

const R13W

R14 const #

const R14

R14B const #

const R14B

R14L const #

const R14L

R14W const #

const R14W

R15 const #

const R15

R15B const #

const R15B

R15L const #

const R15L

R15W const #

const R15W

R8 const #

const R8

R8B const #

const R8B

R8L const #

const R8L

R8W const #

const R8W

R9 const #

const R9

R9B const #

const R9B

R9L const #

const R9L

R9W const #

const R9W

RAX const #

64-bit

const RAX

RBP const #

const RBP

RBX const #

const RBX

RCL const #

const RCL

RCPPS const #

const RCPPS

RCPSS const #

const RCPSS

RCR const #

const RCR

RCX const #

const RCX

RDFSBASE const #

const RDFSBASE

RDGSBASE const #

const RDGSBASE

RDI const #

const RDI

RDMSR const #

const RDMSR

RDPMC const #

const RDPMC

RDRAND const #

const RDRAND

RDTSC const #

const RDTSC

RDTSCP const #

const RDTSCP

RDX const #

const RDX

RET const #

const RET

RIP const #

const RIP

ROL const #

const ROL

ROR const #

const ROR

ROUNDPD const #

const ROUNDPD

ROUNDPS const #

const ROUNDPS

ROUNDSD const #

const ROUNDSD

ROUNDSS const #

const ROUNDSS

RSI const #

const RSI

RSM const #

const RSM

RSP const #

const RSP

RSQRTPS const #

const RSQRTPS

RSQRTSS const #

const RSQRTSS

SAHF const #

const SAHF

SAR const #

const SAR

SBB const #

const SBB

SCASB const #

const SCASB

SCASD const #

const SCASD

SCASQ const #

const SCASQ

SCASW const #

const SCASW

SETA const #

const SETA

SETAE const #

const SETAE

SETB const #

const SETB

SETBE const #

const SETBE

SETE const #

const SETE

SETG const #

const SETG

SETGE const #

const SETGE

SETL const #

const SETL

SETLE const #

const SETLE

SETNE const #

const SETNE

SETNO const #

const SETNO

SETNP const #

const SETNP

SETNS const #

const SETNS

SETO const #

const SETO

SETP const #

const SETP

SETS const #

const SETS

SFENCE const #

const SFENCE

SGDT const #

const SGDT

SHL const #

const SHL

SHLD const #

const SHLD

SHR const #

const SHR

SHRD const #

const SHRD

SHUFPD const #

const SHUFPD

SHUFPS const #

const SHUFPS

SI const #

const SI

SIB const #

const SIB

SIDT const #

const SIDT

SLDT const #

const SLDT

SMSW const #

const SMSW

SP const #

const SP

SPB const #

const SPB

SQRTPD const #

const SQRTPD

SQRTPS const #

const SQRTPS

SQRTSD const #

const SQRTSD

SQRTSS const #

const SQRTSS

SS const #

const SS

STC const #

const STC

STD const #

const STD

STI const #

const STI

STMXCSR const #

const STMXCSR

STOSB const #

const STOSB

STOSD const #

const STOSD

STOSQ const #

const STOSQ

STOSW const #

const STOSW

STR const #

const STR

SUB const #

const SUB

SUBPD const #

const SUBPD

SUBPS const #

const SUBPS

SUBSD const #

const SUBSD

SUBSS const #

const SUBSS

SWAPGS const #

const SWAPGS

SYSCALL const #

const SYSCALL

SYSENTER const #

const SYSENTER

SYSEXIT const #

const SYSEXIT

SYSRET const #

const SYSRET

TASK const #

const TASK

TEST const #

const TEST

TR0 const #

Task registers.

const TR0

TR1 const #

const TR1

TR2 const #

const TR2

TR3 const #

const TR3

TR4 const #

const TR4

TR5 const #

const TR5

TR6 const #

const TR6

TR7 const #

const TR7

TZCNT const #

const TZCNT

UCOMISD const #

const UCOMISD

UCOMISS const #

const UCOMISS

UD0 const #

const UD0

UD1 const #

const UD1

UD2 const #

const UD2

UNPCKHPD const #

const UNPCKHPD

UNPCKHPS const #

const UNPCKHPS

UNPCKLPD const #

const UNPCKLPD

UNPCKLPS const #

const UNPCKLPS

VERR const #

const VERR

VERW const #

const VERW

VMOVDQA const #

const VMOVDQA

VMOVDQU const #

const VMOVDQU

VMOVNTDQ const #

const VMOVNTDQ

VMOVNTDQA const #

const VMOVNTDQA

VZEROUPPER const #

const VZEROUPPER

WBINVD const #

const WBINVD

WRFSBASE const #

const WRFSBASE

WRGSBASE const #

const WRGSBASE

WRMSR const #

const WRMSR

X0 const #

XMM registers.

const X0

X1 const #

const X1

X10 const #

const X10

X11 const #

const X11

X12 const #

const X12

X13 const #

const X13

X14 const #

const X14

X15 const #

const X15

X2 const #

const X2

X3 const #

const X3

X4 const #

const X4

X5 const #

const X5

X6 const #

const X6

X7 const #

const X7

X8 const #

const X8

X9 const #

const X9

XABORT const #

const XABORT

XADD const #

const XADD

XBEGIN const #

const XBEGIN

XCHG const #

const XCHG

XEND const #

const XEND

XGETBV const #

const XGETBV

XLATB const #

const XLATB

XOR const #

const XOR

XORPD const #

const XORPD

XORPS const #

const XORPS

XRSTOR const #

const XRSTOR

XRSTOR64 const #

const XRSTOR64

XRSTORS const #

const XRSTORS

XRSTORS64 const #

const XRSTORS64

XSAVE const #

const XSAVE

XSAVE64 const #

const XSAVE64

XSAVEC const #

const XSAVEC

XSAVEC64 const #

const XSAVEC64

XSAVEOPT const #

const XSAVEOPT

XSAVEOPT64 const #

const XSAVEOPT64

XSAVES const #

const XSAVES

XSAVES64 const #

const XSAVES64

XSETBV const #

const XSETBV

XTEST const #

const XTEST

_ const #

const _ Reg = iota

_ const #

const _ Op = iota

addr16 var #

addr16 records the eight 16-bit addressing modes.

var addr16 = [8]Mem{...}

baseReg var #

baseReg records the base register for argument types that specify a range of registers indexed by op, regop, or rm.

var baseReg = [...]Reg{...}

cmppsOps var #

var cmppsOps = []string{...}

decoder var #

var decoder = [...]uint16{...}

decoderCover var #

decoderCover records coverage information for which parts of the byte code have been executed.

var decoderCover []bool

errInternal var #

var errInternal = *ast.CallExpr

fixedArg var #

fixedArg records the fixed arguments corresponding to the given bytecodes.

var fixedArg = [...]Arg{...}

gccRegName var #

var gccRegName = [...]string{...}

gnuOp var #

var gnuOp = map[Op]string{...}

intelOp var #

var intelOp = map[Op]string{...}

intelReg var #

var intelReg = [...]string{...}

isCondJmp var #

isCondJmp records the conditional jumps.

var isCondJmp = [*ast.BinaryExpr]bool{...}

isLoop var #

isLoop records the loop operators.

var isLoop = [*ast.BinaryExpr]bool{...}

maxOp const #

const maxOp = XTEST

memBytes var #

memBytes records the size of the memory pointed at by a memory argument of the given form.

var memBytes = [...]int8{...}

opNames var #

var opNames = [...]string{...}

pclmulqOps var #

var pclmulqOps = []string{...}

plan9Reg var #

var plan9Reg = [...]string{...}

plan9Suffix var #

var plan9Suffix = [*ast.BinaryExpr]bool{...}

prefixNames var #

var prefixNames = map[Prefix]string{...}

regMax const #

const regMax = TR7

regNames var #

var regNames = [...]string{...}

trace const #

Set trace to true to cause the decoder to print the PC sequence of the executed instruction codes. This is typically only useful when you are running a test of a single input case.

const trace = false

xArg1 const #

const xArg1

xArg3 const #

const xArg3

xArgAL const #

const xArgAL

xArgAX const #

const xArgAX

xArgCL const #

const xArgCL

xArgCR0dashCR7 const #

const xArgCR0dashCR7

xArgCS const #

const xArgCS

xArgDR0dashDR7 const #

const xArgDR0dashDR7

xArgDS const #

const xArgDS

xArgDX const #

const xArgDX

xArgEAX const #

const xArgEAX

xArgEDX const #

const xArgEDX

xArgES const #

const xArgES

xArgFS const #

const xArgFS

xArgGS const #

const xArgGS

xArgImm16 const #

const xArgImm16

xArgImm16u const #

const xArgImm16u

xArgImm32 const #

const xArgImm32

xArgImm64 const #

const xArgImm64

xArgImm8 const #

const xArgImm8

xArgImm8u const #

const xArgImm8u

xArgM const #

const xArgM

xArgM128 const #

const xArgM128

xArgM1428byte const #

const xArgM1428byte

xArgM16 const #

const xArgM16

xArgM16and16 const #

const xArgM16and16

xArgM16and32 const #

const xArgM16and32

xArgM16and64 const #

const xArgM16and64

xArgM16colon16 const #

const xArgM16colon16

xArgM16colon32 const #

const xArgM16colon32

xArgM16colon64 const #

const xArgM16colon64

xArgM16int const #

const xArgM16int

xArgM256 const #

const xArgM256

xArgM2byte const #

const xArgM2byte

xArgM32 const #

const xArgM32

xArgM32and32 const #

const xArgM32and32

xArgM32fp const #

const xArgM32fp

xArgM32int const #

const xArgM32int

xArgM512byte const #

const xArgM512byte

xArgM64 const #

const xArgM64

xArgM64fp const #

const xArgM64fp

xArgM64int const #

const xArgM64int

xArgM8 const #

const xArgM8

xArgM80bcd const #

const xArgM80bcd

xArgM80dec const #

const xArgM80dec

xArgM80fp const #

const xArgM80fp

xArgM94108byte const #

const xArgM94108byte

xArgMem const #

const xArgMem

xArgMm const #

const xArgMm

xArgMm1 const #

const xArgMm1

xArgMm2 const #

const xArgMm2

xArgMm2M64 const #

const xArgMm2M64

xArgMmM32 const #

const xArgMmM32

xArgMmM64 const #

const xArgMmM64

xArgMoffs16 const #

const xArgMoffs16

xArgMoffs32 const #

const xArgMoffs32

xArgMoffs64 const #

const xArgMoffs64

xArgMoffs8 const #

const xArgMoffs8

xArgPtr16colon16 const #

const xArgPtr16colon16

xArgPtr16colon32 const #

const xArgPtr16colon32

xArgR16 const #

const xArgR16

xArgR16op const #

const xArgR16op

xArgR32 const #

const xArgR32

xArgR32M16 const #

const xArgR32M16

xArgR32M8 const #

const xArgR32M8

xArgR32op const #

const xArgR32op

xArgR64 const #

const xArgR64

xArgR64M16 const #

const xArgR64M16

xArgR64op const #

const xArgR64op

xArgR8 const #

const xArgR8

xArgR8op const #

const xArgR8op

xArgRAX const #

const xArgRAX

xArgRDX const #

const xArgRDX

xArgRM const #

const xArgRM

xArgRM16 const #

const xArgRM16

xArgRM32 const #

const xArgRM32

xArgRM64 const #

const xArgRM64

xArgRM8 const #

const xArgRM8

xArgReg const #

const xArgReg

xArgRegM16 const #

const xArgRegM16

xArgRegM32 const #

const xArgRegM32

xArgRegM8 const #

const xArgRegM8

xArgRel16 const #

const xArgRel16

xArgRel32 const #

const xArgRel32

xArgRel8 const #

const xArgRel8

xArgRmf16 const #

const xArgRmf16

xArgRmf32 const #

const xArgRmf32

xArgRmf64 const #

const xArgRmf64

xArgSS const #

const xArgSS

xArgST const #

const xArgST

xArgSTi const #

const xArgSTi

xArgSreg const #

const xArgSreg

xArgTR0dashTR7 const #

const xArgTR0dashTR7

xArgXMM0 const #

const xArgXMM0

xArgXmm const #

const xArgXmm

xArgXmm1 const #

const xArgXmm1

xArgXmm2 const #

const xArgXmm2

xArgXmm2M128 const #

const xArgXmm2M128

xArgXmm2M16 const #

const xArgXmm2M16

xArgXmm2M32 const #

const xArgXmm2M32

xArgXmm2M64 const #

const xArgXmm2M64

xArgXmmM128 const #

const xArgXmmM128

xArgXmmM32 const #

const xArgXmmM32

xArgXmmM64 const #

const xArgXmmM64

xArgYmm1 const #

const xArgYmm1

xArgYmm2M256 const #

const xArgYmm2M256

xCondAddrSize const #

const xCondAddrSize

xCondByte const #

const xCondByte

xCondDataSize const #

const xCondDataSize

xCondIs64 const #

const xCondIs64

xCondIsMem const #

const xCondIsMem

xCondPrefix const #

const xCondPrefix

xCondSlashR const #

const xCondSlashR

xFail const #

const xFail decodeOp = iota

xJump const #

const xJump

xMatch const #

const xMatch

xReadCb const #

const xReadCb

xReadCd const #

const xReadCd

xReadCm const #

const xReadCm

xReadCp const #

const xReadCp

xReadCw const #

const xReadCw

xReadIb const #

const xReadIb

xReadId const #

const xReadId

xReadIo const #

const xReadIo

xReadIw const #

const xReadIw

xReadSlashR const #

const xReadSlashR

xSetOp const #

const xSetOp

Type Aliases

Args type #

An Args holds the instruction arguments. If an instruction has fewer than 4 arguments, the final elements in the array are nil.

type Args [4]Arg

Imm type #

An Imm is an integer constant.

type Imm int64

Op type #

An Op is an x86 opcode.

type Op uint32

Prefix type #

A Prefix represents an Intel instruction prefix. The low 8 bits are the actual prefix byte encoding, and the top 8 bits contain distinguishing bits and metadata.

type Prefix uint16

Prefixes type #

Prefixes is an array of prefixes associated with a single instruction. The prefixes are listed in the same order as found in the instruction: each prefix byte corresponds to one slot in the array. The first zero in the array marks the end of the prefixes.

type Prefixes [14]Prefix

Reg type #

A Reg is a single register. The zero Reg value has no name but indicates “no register.”

type Reg uint8

Rel type #

A Rel is an offset relative to the current instruction pointer.

type Rel int32

SymLookup type #

type SymLookup func(uint64) (string, uint64)

decodeOp type #

type decodeOp uint16

Interfaces

Arg interface #

An Arg is a single instruction argument, one of these types: Reg, Mem, Imm, Rel.

type Arg interface {
String() string
isArg()
}

Structs

Inst struct #

An Inst is a single instruction.

type Inst struct {
Prefix Prefixes
Op Op
Opcode uint32
Args Args
Mode int
AddrSize int
DataSize int
MemBytes int
Len int
PCRel int
PCRelOff int
}

Mem struct #

A Mem is a memory reference. The general form is Segment:[Base+Scale*Index+Disp].

type Mem struct {
Segment Reg
Base Reg
Scale uint8
Index Reg
Disp int64
}

Functions

Decode function #

Decode decodes the leading bytes in src as a single instruction. The mode arguments specifies the assumed processor mode: 16, 32, or 64 for 16-, 32-, and 64-bit execution modes.

func Decode(src []byte, mode int) (inst Inst, err error)

GNUSyntax function #

GNUSyntax returns the GNU assembler syntax for the instruction, as defined by GNU binutils. This general form is often called “AT&T syntax” as a reference to AT&T System V Unix.

func GNUSyntax(inst Inst, pc uint64, symname SymLookup) string

GoSyntax function #

GoSyntax returns the Go assembler syntax for the instruction. The syntax was originally defined by Plan 9. The pc is the program counter of the instruction, used for expanding PC-relative addresses into absolute ones. The symname function queries the symbol table for the program being disassembled. Given a target address it returns the name and base address of the symbol containing the target, if any; otherwise it returns "", 0.

func GoSyntax(inst Inst, pc uint64, symname SymLookup) string

IntelSyntax function #

IntelSyntax returns the Intel assembler syntax for the instruction, as defined by Intel's XED tool.

func IntelSyntax(inst Inst, pc uint64, symname SymLookup) string

IsREX method #

IsREX reports whether p is a REX prefix byte.

func (p Prefix) IsREX() bool

IsVEX method #

func (p Prefix) IsVEX() bool

String method #

func (i Imm) String() string

String method #

func (p Prefix) String() string

String method #

func (i Inst) String() string

String method #

func (r Rel) String() string

String method #

func (m Mem) String() string

String method #

func (r Reg) String() string

String method #

func (op Op) String() string

argBytes function #

func argBytes(inst *Inst, arg Arg) int

baseRegForBits function #

baseRegForBits returns the base register for a given register size in bits.

func baseRegForBits(bits int) Reg

byteSizeSuffix function #

func byteSizeSuffix(b int) string

countPrefix function #

func countPrefix(inst *Inst, target Prefix) int

decode1 function #

decode1 is the implementation of Decode but takes an extra gnuCompat flag to cause it to change its behavior to mimic bugs (or at least unique features) of GNU libopcodes as used by objdump. We don't believe that logic is the right thing to do in general, but when testing against libopcodes it simplifies the comparison if we adjust a few small pieces of logic. The affected logic is in the conditional branch for "mandatory" prefixes, case xCondPrefix.

func decode1(src []byte, mode int, gnuCompat bool) (Inst, error)

gnuArg function #

gnuArg returns the GNU syntax for the argument x from the instruction inst. If *usedPrefixes is false and x is a Mem, then the formatting includes any segment prefixes and sets *usedPrefixes to true.

func gnuArg(inst *Inst, pc uint64, symname SymLookup, x Arg, usedPrefixes *bool) string

instPrefix function #

instPrefix returns an Inst describing just one prefix byte. It is only used if there is a prefix followed by an unintelligible or invalid instruction byte sequence.

func instPrefix(b byte, mode int) (Inst, error)

intelArg function #

func intelArg(inst *Inst, pc uint64, symname SymLookup, arg Arg) string

isArg method #

func (Reg) isArg()

isArg method #

func (Rel) isArg()

isArg method #

func (Imm) isArg()

isArg method #

func (Mem) isArg()

isFloat function #

func isFloat(op Op) bool

isFloatInt function #

func isFloatInt(op Op) bool

isImm function #

func isImm(a Arg) bool

isMem function #

func isMem(a Arg) bool

isReg function #

func isReg(a Arg) bool

isSegReg function #

func isSegReg(a Arg) bool

isSegment function #

func isSegment(p Prefix) bool

markLastImplicit function #

func markLastImplicit(inst *Inst, prefix Prefix) bool

memArgToSymbol function #

func memArgToSymbol(a Mem, pc uint64, instrLen int, symname SymLookup) (string, int64)

plan9Arg function #

func plan9Arg(inst *Inst, pc uint64, symname func(uint64) (string, uint64), arg Arg) string

prefixToSegment function #

prefixToSegment returns the segment register corresponding to a particular segment prefix.

func prefixToSegment(p Prefix) Reg

regBytes function #

func regBytes(a Arg) int

truncated function #

truncated reports a truncated instruction. For now we use instPrefix but perhaps later we will return a specific error here.

func truncated(src []byte, mode int) (Inst, error)

unmarkImplicit function #

func unmarkImplicit(inst *Inst, prefix Prefix)

Generated with Arrow