Imports #
"encoding/binary"
"fmt"
"fmt"
"bytes"
"fmt"
"strings"
"fmt"
"strconv"
"strings"
"encoding/binary"
"fmt"
"fmt"
"bytes"
"fmt"
"strings"
"fmt"
"strconv"
"strings"
const A
const A0
const A1
const A10
const A11
const A12
const A13
const A14
const A15
const A2
const A3
const A4
const A5
const A6
const A7
const A8
const A9
const AD
const ADB
const ADBR
const ADR
const ADTR
const ADTRA
const AE
const AEB
const AEBR
const AER
const AFI
const AG
const AGF
const AGFI
const AGFR
const AGH
const AGHI
const AGHIK
const AGR
const AGRK
const AGSI
const AH
const AHHHR
const AHHLR
const AHI
const AHIK
const AHY
const AIH
const AL
const ALC
const ALCG
const ALCGR
const ALCR
const ALFI
const ALG
const ALGF
const ALGFI
const ALGFR
const ALGHSIK
const ALGR
const ALGRK
const ALGSI
const ALHHHR
const ALHHLR
const ALHSIK
const ALR
const ALRK
const ALSI
const ALSIH
const ALSIHN
const ALY
const AP
const AR
const ARK
const ASI
const AU
const AUR
const AW
const AWR
const AXBR
const AXR
const AXTR
const AXTRA
const AY
const B0 Base = iota
const B1
const B10
const B11
const B12
const B13
const B14
const B15
const B2
const B3
const B4
const B5
const B6
const B7
const B8
const B9
const BAKR
const BAL
const BALR
const BAS
const BASR
const BASSM
const BC
const BCR
const BCT
const BCTG
const BCTGR
const BCTR
const BIC
const BPP
const BPRP
const BRAS
const BRASL
const BRC
const BRCL
const BRCT
const BRCTG
const BRCTH
const BRXH
const BRXHG
const BRXLE
const BRXLG
const BSA
const BSG
const BSM
const BXH
const BXHG
const BXLE
const BXLEG
const C
const C0
const C1
const C10
const C11
const C12
const C13
const C14
const C15
const C2
const C3
const C4
const C5
const C6
const C7
const C8
const C9
const CD
const CDB
const CDBR
const CDFBR
const CDFBRA
const CDFR
const CDFTR
const CDGBR
const CDGBRA
const CDGR
const CDGTR
const CDGTRA
const CDLFBR
const CDLFTR
const CDLGBR
const CDLGTR
const CDPT
const CDR
const CDS
const CDSG
const CDSTR
const CDSY
const CDTR
const CDUTR
const CDZT
const CE
const CEB
const CEBR
const CEDTR
const CEFBR
const CEFBRA
const CEFR
const CEGBR
const CEGBRA
const CEGR
const CELFBR
const CELGBR
const CER
const CEXTR
const CFC
const CFDBR
const CFDBRA
const CFDR
const CFDTR
const CFEBR
const CFEBRA
const CFER
const CFI
const CFXBR
const CFXBRA
const CFXR
const CFXTR
const CG
const CGDBR
const CGDBRA
const CGDR
const CGDTR
const CGDTRA
const CGEBR
const CGEBRA
const CGER
const CGF
const CGFI
const CGFR
const CGFRL
const CGH
const CGHI
const CGHRL
const CGHSI
const CGIB
const CGIJ
const CGIT
const CGR
const CGRB
const CGRJ
const CGRL
const CGRT
const CGXBR
const CGXBRA
const CGXR
const CGXTR
const CGXTRA
const CH
const CHF
const CHHR
const CHHSI
const CHI
const CHLR
const CHRL
const CHSI
const CHY
const CIB
const CIH
const CIJ
const CIT
const CKSM
const CL
const CLC
const CLCL
const CLCLE
const CLCLU
const CLFDBR
const CLFDTR
const CLFEBR
const CLFHSI
const CLFI
const CLFIT
const CLFXBR
const CLFXTR
const CLG
const CLGDBR
const CLGDTR
const CLGEBR
const CLGF
const CLGFI
const CLGFR
const CLGFRL
const CLGHRL
const CLGHSI
const CLGIB
const CLGIJ
const CLGIT
const CLGR
const CLGRB
const CLGRJ
const CLGRL
const CLGRT
const CLGT
const CLGXBR
const CLGXTR
const CLHF
const CLHHR
const CLHHSI
const CLHLR
const CLHRL
const CLI
const CLIB
const CLIH
const CLIJ
const CLIY
const CLM
const CLMH
const CLMY
const CLR
const CLRB
const CLRJ
const CLRL
const CLRT
const CLST
const CLT
const CLY
const CMPSC
const CP
const CPDT
const CPSDR
const CPXT
const CPYA
const CR
const CRB
const CRDTE
const CRJ
const CRL
const CRT
const CS
const CSCH
const CSDTR
const CSG
const CSP
const CSPG
const CSST
const CSXTR
const CSY
const CU12
const CU14
const CU21
const CU24
const CU41
const CU42
const CUDTR
const CUSE
const CUXTR
const CVB
const CVBG
const CVBY
const CVD
const CVDG
const CVDY
const CXBR
const CXFBR
const CXFBRA
const CXFR
const CXFTR
const CXGBR
const CXGBRA
const CXGR
const CXGTR
const CXGTRA
const CXLFBR
const CXLFTR
const CXLGBR
const CXLGTR
const CXPT
const CXR
const CXSTR
const CXTR
const CXUTR
const CXZT
const CY
const CZDT
const CZXT
const D
const DD
const DDB
const DDBR
const DDR
const DDTR
const DDTRA
const DE
const DEB
const DEBR
const DER
const DFLTCC
const DIDBR
const DIEBR
const DL
const DLG
const DLGR
const DLR
const DP
const DR
const DSG
const DSGF
const DSGFR
const DSGR
const DXBR
const DXR
const DXTR
const DXTRA
const EAR
const ECAG
const ECTG
const ED
const EDMK
const EEDTR
const EEXTR
const EFPC
const EPAIR
const EPAR
const EPSW
const EREG
const EREGG
const ESAIR
const ESAR
const ESDTR
const ESEA
const ESTA
const ESXTR
const ETND
const EX
const EXRL
const F0
const F1
const F10
const F11
const F12
const F13
const F14
const F15
const F2
const F3
const F4
const F5
const F6
const F7
const F8
const F9
const FIDBR
const FIDBRA
const FIDR
const FIDTR
const FIEBR
const FIEBRA
const FIER
const FIXBR
const FIXBRA
const FIXR
const FIXTR
const FLOGR
const HDR
const HER
const HSCH
const IAC
const IC
const ICM
const ICMH
const ICMY
const ICY
const IDTE
const IEDTR
const IEXTR
const IIHF
const IIHH
const IIHL
const IILF
const IILH
const IILL
const IPK
const IPM
const IPTE
const IRBM
const ISKE
const IVSK
const KDB
const KDBR
const KDSA
const KDTR
const KEB
const KEBR
const KIMD
const KLMD
const KM
const KMA
const KMAC
const KMC
const KMCTR
const KMF
const KMO
const KXBR
const KXTR
const L
const LA
const LAA
const LAAG
const LAAL
const LAALG
const LAE
const LAEY
const LAM
const LAMY
const LAN
const LANG
const LAO
const LAOG
const LARL
const LASP
const LAT
const LAX
const LAXG
const LAY
const LB
const LBEAR
const LBH
const LBR
const LCBB
const LCDBR
const LCDFR
const LCDR
const LCEBR
const LCER
const LCGFR
const LCGR
const LCR
const LCTL
const LCTLG
const LCXBR
const LCXR
const LD
const LDE
const LDEB
const LDEBR
const LDER
const LDETR
const LDGR
const LDR
const LDXBR
const LDXBRA
const LDXR
const LDXTR
const LDY
const LE
const LEDBR
const LEDBRA
const LEDR
const LEDTR
const LER
const LEXBR
const LEXBRA
const LEXR
const LEY
const LFAS
const LFH
const LFHAT
const LFPC
const LG
const LGAT
const LGB
const LGBR
const LGDR
const LGF
const LGFI
const LGFR
const LGFRL
const LGG
const LGH
const LGHI
const LGHR
const LGHRL
const LGR
const LGRL
const LGSC
const LH
const LHH
const LHI
const LHR
const LHRL
const LHY
const LLC
const LLCH
const LLCR
const LLGC
const LLGCR
const LLGF
const LLGFAT
const LLGFR
const LLGFRL
const LLGFSG
const LLGH
const LLGHR
const LLGHRL
const LLGT
const LLGTAT
const LLGTR
const LLH
const LLHH
const LLHR
const LLHRL
const LLIHF
const LLIHH
const LLIHL
const LLILF
const LLILH
const LLILL
const LLZRGF
const LM
const LMD
const LMG
const LMH
const LMY
const LNDBR
const LNDFR
const LNDR
const LNEBR
const LNER
const LNGFR
const LNGR
const LNR
const LNXBR
const LNXR
const LOC
const LOCFH
const LOCFHR
const LOCG
const LOCGHI
const LOCGR
const LOCHHI
const LOCHI
const LOCR
const LPD
const LPDBR
const LPDFR
const LPDG
const LPDR
const LPEBR
const LPER
const LPGFR
const LPGR
const LPQ
const LPR
const LPSW
const LPSWE
const LPSWEY
const LPTEA
const LPXBR
const LPXR
const LR
const LRA
const LRAG
const LRAY
const LRDR
const LRER
const LRL
const LRV
const LRVG
const LRVGR
const LRVH
const LRVR
const LT
const LTDBR
const LTDR
const LTDTR
const LTEBR
const LTER
const LTG
const LTGF
const LTGFR
const LTGR
const LTR
const LTXBR
const LTXR
const LTXTR
const LURA
const LURAG
const LXD
const LXDB
const LXDBR
const LXDR
const LXDTR
const LXE
const LXEB
const LXEBR
const LXER
const LXR
const LY
const LZDR
const LZER
const LZRF
const LZRG
const LZXR
const M
const MAD
const MADB
const MADBR
const MADR
const MAE
const MAEB
const MAEBR
const MAER
const MAY
const MAYH
const MAYHR
const MAYL
const MAYLR
const MAYR
const MC
const MD
const MDB
const MDBR
const MDE
const MDEB
const MDEBR
const MDER
const MDR
const MDTR
const MDTRA
const ME
const MEE
const MEEB
const MEEBR
const MEER
const MER
const MFY
const MG
const MGH
const MGHI
const MGRK
const MH
const MHI
const MHY
const ML
const MLG
const MLGR
const MLR
const MP
const MR
const MS
const MSC
const MSCH
const MSD
const MSDB
const MSDBR
const MSDR
const MSE
const MSEB
const MSEBR
const MSER
const MSFI
const MSG
const MSGC
const MSGF
const MSGFI
const MSGFR
const MSGR
const MSGRKC
const MSR
const MSRKC
const MSTA
const MSY
const MVC
const MVCDK
const MVCIN
const MVCK
const MVCL
const MVCLE
const MVCLU
const MVCOS
const MVCP
const MVCRL
const MVCS
const MVCSK
const MVGHI
const MVHHI
const MVHI
const MVI
const MVIY
const MVN
const MVO
const MVPG
const MVST
const MVZ
const MXBR
const MXD
const MXDB
const MXDBR
const MXDR
const MXR
const MXTR
const MXTRA
const MY
const MYH
const MYHR
const MYL
const MYLR
const MYR
const N
const NC
const NCGRK
const NCRK
const NG
const NGR
const NGRK
const NI
const NIAI
const NIHF
const NIHH
const NIHL
const NILF
const NILH
const NILL
const NIY
const NNGRK
const NNPA
const NNRK
const NOGRK
const NORK
const NR
const NRK
const NTSTG
const NXGRK
const NXRK
const NY
const O
const OC
const OCGRK
const OCRK
const OG
const OGR
const OGRK
const OI
const OIHF
const OIHH
const OIHL
const OILF
const OILH
const OILL
const OIY
const OR
const ORK
const OY
const PACK
const PALB
const PC
const PCC
const PCKMO
const PFD
const PFDRL
const PFMF
const PFPO
const PGIN
const PGOUT
const PKA
const PKU
const PLO
const POPCNT
const PPA
const PR
const PRNO
const PT
const PTF
const PTFF
const PTI
const PTLB
const QADTR
const QAXTR
const QPACI
const R0 Reg = iota
const R1
const R10
const R11
const R12
const R13
const R14
const R15
const R2
const R3
const R4
const R5
const R6
const R7
const R8
const R9
const RCHP
const RDP
const RISBG
const RISBGN
const RISBHG
const RISBLG
const RLL
const RLLG
const RNSBG
const ROSBG
const RP
const RRBE
const RRBM
const RRDTR
const RRXTR
const RSCH
const RXSBG
const S
const SAC
const SACF
const SAL
const SAM24
const SAM31
const SAM64
const SAR
const SCHM
const SCK
const SCKC
const SCKPF
const SD
const SDB
const SDBR
const SDR
const SDTR
const SDTRA
const SE
const SEB
const SEBR
const SELFHR
const SELGR
const SELR
const SER
const SFASR
const SFPC
const SG
const SGF
const SGFR
const SGH
const SGR
const SGRK
const SH
const SHHHR
const SHHLR
const SHY
const SIGP
const SL
const SLA
const SLAG
const SLAK
const SLB
const SLBG
const SLBGR
const SLBR
const SLDA
const SLDL
const SLDT
const SLFI
const SLG
const SLGF
const SLGFI
const SLGFR
const SLGR
const SLGRK
const SLHHHR
const SLHHLR
const SLL
const SLLG
const SLLK
const SLR
const SLRK
const SLXT
const SLY
const SORTL
const SP
const SPKA
const SPM
const SPT
const SPX
const SQD
const SQDB
const SQDBR
const SQDR
const SQE
const SQEB
const SQEBR
const SQER
const SQXBR
const SQXR
const SR
const SRA
const SRAG
const SRAK
const SRDA
const SRDL
const SRDT
const SRK
const SRL
const SRLG
const SRLK
const SRNM
const SRNMB
const SRNMT
const SRP
const SRST
const SRSTU
const SRXT
const SSAIR
const SSAR
const SSCH
const SSKE
const SSM
const ST
const STAM
const STAMY
const STAP
const STBEAR
const STC
const STCH
const STCK
const STCKC
const STCKE
const STCKF
const STCM
const STCMH
const STCMY
const STCPS
const STCRW
const STCTG
const STCTL
const STCY
const STD
const STDY
const STE
const STEY
const STFH
const STFL
const STFLE
const STFPC
const STG
const STGRL
const STGSC
const STH
const STHH
const STHRL
const STHY
const STIDP
const STM
const STMG
const STMH
const STMY
const STNSM
const STOC
const STOCFH
const STOCG
const STOSM
const STPQ
const STPT
const STPX
const STRAG
const STRL
const STRV
const STRVG
const STRVH
const STSCH
const STSI
const STURA
const STURG
const STY
const SU
const SUR
const SVC
const SW
const SWR
const SXBR
const SXR
const SXTR
const SXTRA
const SY
const TABORT
const TAM
const TAR
const TB
const TBDR
const TBEDR
const TBEGIN
const TBEGINC
const TCDB
const TCEB
const TCXB
const TDCDT
const TDCET
const TDCXT
const TDGDT
const TDGET
const TDGXT
const TEND
const THDER
const THDR
const TM
const TMH
const TMHH
const TMHL
const TML
const TMLH
const TMLL
const TMY
const TP
const TPEI
const TPI
const TPROT
const TR
const TRACE
const TRACG
const TRAP2
const TRAP4
const TRE
const TROO
const TROT
const TRT
const TRTE
const TRTO
const TRTR
const TRTRE
const TRTT
const TS
const TSCH
const TypeACReg
const TypeBaseReg
const TypeCReg
const TypeDispSigned20
const TypeDispUnsigned
const TypeFPReg
const TypeImmSigned16
const TypeImmSigned32
const TypeImmSigned8
const TypeImmUnsigned
const TypeIndexReg
const TypeLast
const TypeLen
const TypeMask
const TypeReg
const TypeRegImSigned12
const TypeRegImSigned16
const TypeRegImSigned24
const TypeRegImSigned32
const TypeUnknown ArgType = iota
const TypeVecReg
const UNPK
const UNPKA
const UNPKU
const UPT
const V0 VReg = iota
const V1
const V10
const V11
const V12
const V13
const V14
const V15
const V16
const V17
const V18
const V19
const V2
const V20
const V21
const V22
const V23
const V24
const V25
const V26
const V27
const V28
const V29
const V3
const V30
const V31
const V4
const V5
const V6
const V7
const V8
const V9
const VA
const VAC
const VACC
const VACCC
const VAP
const VAVG
const VAVGL
const VBPERM
const VCDG
const VCDLG
const VCEQ
const VCFN
const VCFPL
const VCFPS
const VCGD
const VCH
const VCHL
const VCKSM
const VCLFNH
const VCLFNL
const VCLFP
const VCLGD
const VCLZ
const VCLZDP
const VCNF
const VCP
const VCRNF
const VCSFP
const VCSPH
const VCTZ
const VCVB
const VCVBG
const VCVD
const VCVDG
const VDP
const VEC
const VECL
const VERIM
const VERLL
const VERLLV
const VESL
const VESLV
const VESRA
const VESRAV
const VESRL
const VESRLV
const VFA
const VFAE
const VFCE
const VFCH
const VFCHE
const VFD
const VFEE
const VFENE
const VFI
const VFLL
const VFLR
const VFM
const VFMA
const VFMAX
const VFMIN
const VFMS
const VFNMA
const VFNMS
const VFPSO
const VFS
const VFSQ
const VFTCI
const VGBM
const VGEF
const VGEG
const VGFM
const VGFMA
const VGM
const VISTR
const VL
const VLBB
const VLBR
const VLBRREP
const VLC
const VLEB
const VLEBRF
const VLEBRG
const VLEBRH
const VLEF
const VLEG
const VLEH
const VLEIB
const VLEIF
const VLEIG
const VLEIH
const VLER
const VLGV
const VLIP
const VLL
const VLLEBRZ
const VLLEZ
const VLM
const VLP
const VLR
const VLREP
const VLRL
const VLRLR
const VLVG
const VLVGP
const VMAE
const VMAH
const VMAL
const VMALE
const VMALH
const VMALO
const VMAO
const VME
const VMH
const VML
const VMLE
const VMLH
const VMLO
const VMN
const VMNL
const VMO
const VMP
const VMRH
const VMRL
const VMSL
const VMSP
const VMX
const VMXL
const VN
const VNC
const VNN
const VNO
const VNX
const VO
const VOC
const VPDI
const VPERM
const VPK
const VPKLS
const VPKS
const VPKZ
const VPKZR
const VPOPCT
const VPSOP
const VREP
const VREPI
const VRP
const VS
const VSBCBI
const VSBI
const VSCBI
const VSCEF
const VSCEG
const VSCHP
const VSCSHP
const VSDP
const VSEG
const VSEL
const VSL
const VSLB
const VSLD
const VSLDB
const VSP
const VSRA
const VSRAB
const VSRD
const VSRL
const VSRLB
const VSRP
const VSRPR
const VST
const VSTBR
const VSTEB
const VSTEBRF
const VSTEBRG
const VSTEBRH
const VSTEF
const VSTEG
const VSTEH
const VSTER
const VSTL
const VSTM
const VSTRC
const VSTRL
const VSTRLR
const VSTRS
const VSUM
const VSUMG
const VSUMQ
const VTM
const VTP
const VUPH
const VUPKZ
const VUPKZH
const VUPKZL
const VUPL
const VUPLH
const VUPLL
const VX
const WFC
const WFK
const X
const X0 Index = iota
const X1
const X10
const X11
const X12
const X13
const X14
const X15
const X2
const X3
const X4
const X5
const X6
const X7
const X8
const X9
const XC
const XG
const XGR
const XGRK
const XI
const XIHF
const XILF
const XIY
const XR
const XRK
const XSCH
const XY
const ZAP
const _ Op = iota
var ap_ACReg_12_15 = *ast.UnaryExpr
var ap_ACReg_24_27 = *ast.UnaryExpr
var ap_ACReg_28_31 = *ast.UnaryExpr
var ap_ACReg_8_11 = *ast.UnaryExpr
var ap_BaseReg_16_19 = *ast.UnaryExpr
var ap_BaseReg_32_35 = *ast.UnaryExpr
var ap_CReg_12_15 = *ast.UnaryExpr
var ap_CReg_8_11 = *ast.UnaryExpr
var ap_DispSigned20_20_39 = *ast.UnaryExpr
var ap_DispUnsigned_20_31 = *ast.UnaryExpr
var ap_DispUnsigned_36_47 = *ast.UnaryExpr
var ap_FPReg_12_15 = *ast.UnaryExpr
var ap_FPReg_16_19 = *ast.UnaryExpr
var ap_FPReg_24_27 = *ast.UnaryExpr
var ap_FPReg_28_31 = *ast.UnaryExpr
var ap_FPReg_32_35 = *ast.UnaryExpr
var ap_FPReg_8_11 = *ast.UnaryExpr
var ap_ImmSigned16_16_31 = *ast.UnaryExpr
var ap_ImmSigned16_32_47 = *ast.UnaryExpr
var ap_ImmSigned32_16_31 = *ast.UnaryExpr
var ap_ImmSigned32_16_47 = *ast.UnaryExpr
var ap_ImmSigned8_32_39 = *ast.UnaryExpr
var ap_ImmSigned8_8_15 = *ast.UnaryExpr
var ap_ImmUnsigned_12_15 = *ast.UnaryExpr
var ap_ImmUnsigned_16_23 = *ast.UnaryExpr
var ap_ImmUnsigned_16_27 = *ast.UnaryExpr
var ap_ImmUnsigned_16_31 = *ast.UnaryExpr
var ap_ImmUnsigned_16_47 = *ast.UnaryExpr
var ap_ImmUnsigned_24_27 = *ast.UnaryExpr
var ap_ImmUnsigned_24_31 = *ast.UnaryExpr
var ap_ImmUnsigned_28_31 = *ast.UnaryExpr
var ap_ImmUnsigned_28_35 = *ast.UnaryExpr
var ap_ImmUnsigned_32_35 = *ast.UnaryExpr
var ap_ImmUnsigned_32_39 = *ast.UnaryExpr
var ap_ImmUnsigned_32_47 = *ast.UnaryExpr
var ap_ImmUnsigned_36_39 = *ast.UnaryExpr
var ap_ImmUnsigned_8_15 = *ast.UnaryExpr
var ap_IndexReg_12_15 = *ast.UnaryExpr
var ap_Len_12_15 = *ast.UnaryExpr
var ap_Len_8_11 = *ast.UnaryExpr
var ap_Len_8_15 = *ast.UnaryExpr
var ap_Mask_12_15 = *ast.UnaryExpr
var ap_Mask_16_19 = *ast.UnaryExpr
var ap_Mask_20_23 = *ast.UnaryExpr
var ap_Mask_24_27 = *ast.UnaryExpr
var ap_Mask_28_31 = *ast.UnaryExpr
var ap_Mask_32_35 = *ast.UnaryExpr
var ap_Mask_36_39 = *ast.UnaryExpr
var ap_Mask_8_11 = *ast.UnaryExpr
var ap_RegImSigned12_12_23 = *ast.UnaryExpr
var ap_RegImSigned16_16_31 = *ast.UnaryExpr
var ap_RegImSigned16_32_47 = *ast.UnaryExpr
var ap_RegImSigned24_24_47 = *ast.UnaryExpr
var ap_RegImSigned32_16_47 = *ast.UnaryExpr
var ap_Reg_12_15 = *ast.UnaryExpr
var ap_Reg_16_19 = *ast.UnaryExpr
var ap_Reg_24_27 = *ast.UnaryExpr
var ap_Reg_28_31 = *ast.UnaryExpr
var ap_Reg_8_11 = *ast.UnaryExpr
var ap_VecReg_12_15 = *ast.UnaryExpr
var ap_VecReg_16_19 = *ast.UnaryExpr
var ap_VecReg_32_35 = *ast.UnaryExpr
var ap_VecReg_8_11 = *ast.UnaryExpr
var decoderCover []bool
Errors
var errShort = *ast.CallExpr
var errUnknown = *ast.CallExpr
var instFormats = [...]instFormat{...}
var opstr = [...]string{...}
var vectorCS = map[int]string{...}
var vectorSize = map[int]string{...}
type ArgType int8
An Args holds the instruction arguments. If an instruction has fewer than 6 arguments, the final elements in the array are nil.
type Args [8]Arg
Base represents an 4-bit Base Register field
type Base uint8
Disp12 represents an 12-bit Unsigned Displacement
type Disp12 uint16
Disp20 represents an 20-bit Unsigned Displacement
type Disp20 uint32
Imm represents an immediate number.
type Imm uint32
Index represents an 4-bit Index Register field
type Index uint8
Len represents an 8-bit type holds 4/8-bit Len argument
type Len uint8
Mask represents an 4-bit mask value
type Mask uint8
An Op is an instruction operation.
type Op uint16
A Reg is a single register. The zero value means R0, not the absence of a register. It also includes special registers.
type Reg uint16
RegIm12 represents an 12-bit Register immediate number.
type RegIm12 uint16
RegIm16 represents an 16-bit Register immediate number.
type RegIm16 uint16
RegIm24 represents an 24-bit Register immediate number.
type RegIm24 uint32
RegIm32 represents an 32-bit Register immediate number.
type RegIm32 uint32
Sign16 represents an 16-bit signed immediate number.
type Sign16 int16
Sign32 represents an 32-bit signed immediate number.
type Sign32 int32
Sign8 represents an 8-bit signed immediate number.
type Sign8 int8
type VReg uint8
An Arg is a single instruction argument. One of these types: Reg, Base, Index, Disp20, Disp12, Len, Mask, Sign8, Sign16, Sign32, RegIm12, RegIm16, RegIm24, RegIm32.
type Arg interface {
IsArg()
String(pc uint64) string
}
A BitField is a bit-field in a 64-bit double word. Bits are counted from 0 from the MSB to 63 as the LSB.
type BitField struct {
Offs uint8
Bits uint8
}
type Inst struct {
Op Op
Enc uint64
Len int
Args Args
}
argField indicate how to decode an argument to an instruction. First parse the value from the BitFields, shift it left by Shift bits to get the actual numerical value.
type argField struct {
Type ArgType
flags uint16
BitField
}
instFormat is a decoding rule for one specific instruction form. An instruction ins matches the rule if ins&Mask == Value. DontCare bits are mainly used for finding the same instruction name differing with the number of argument fields. The Args are stored in the same order as the instruction manual.
type instFormat struct {
Op Op
Mask uint64
Value uint64
DontCare uint64
Args [8]*argField
}
Typ1 - Instructions having different base and extended mnemonic strings. These instructions have single M-field value and single offset.
type typ1ExtndMnics struct {
BaseOpStr string
Value uint8
Offset uint8
ExtnOpStr string
}
Typ2 - Instructions having couple of extra strings added to the base mnemonic string, depending on the condition code evaluation. These instructions have single M-field value and single offset.
type typ2ExtndMnics struct {
Value uint8
Offset uint8
ExtnOpStr string
}
Typ3 - Instructions having couple of extra strings added to the base mnemonic string, depending on the condition code evaluation. These instructions have two M-field values and two offsets.
type typ3ExtndMnics struct {
Value1 uint8
Value2 uint8
Offset1 uint8
Offset2 uint8
ExtnOpStr string
}
Typ4 - Instructions having different base and extended mnemonic strings. These instructions have two M-field values and two offsets.
type typ4ExtndMnics struct {
BaseOpStr string
Value1 uint8
Value2 uint8
Offset1 uint8
Offset2 uint8
ExtnOpStr string
}
Typ5 - Instructions having different base and extended mnemonic strings. These instructions have three M-field values and three offsets.
type typ5ExtndMnics struct {
BaseOpStr string
Value1 uint8
Value2 uint8
Value3 uint8
Offset1 uint8
Offset2 uint8
Offset3 uint8
ExtnOpStr string
}
Decode decodes the leading bytes in src as a single instruction using byte order ord.
func Decode(src []byte) (inst Inst, err error)
This is the function that is called to print the disassembled instruction in the GNU (AT&T) syntax form.
func GNUSyntax(inst Inst, pc uint64) string
func (t ArgType) GoString() string
GoSyntax returns the Go assembler syntax for the instruction. The syntax was originally defined by Plan 9. The inst relates to single instruction. 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 func(uint64) (string, uint64)) string
"func Handleextndmnemonic" - This is the function where the extended mnemonic logic is implemented. This function defines various structures to keep a list of base instructions and their extended mnemonic strings. These structure will also have M-field values and offset values defined, based on their type. HandleExtndMnemonic takes "inst" structure as the input variable. Inst structure will have all the details related to an instruction. Based on the opcode base string, a switch-case statement is executed. In that, based on the M-field value and the offset value of that particular M-field, extended mnemonic string is either searched or constructed by adding couple of extra strings to the base opcode string from one of the structure defined below.
func HandleExtndMnemonic(inst *Inst) string
func (Mask) IsArg()
func (Len) IsArg()
func (VReg) IsArg()
func (Sign32) IsArg()
func (Sign16) IsArg()
func (Sign8) IsArg()
func (Imm) IsArg()
func (Base) IsArg()
func (Reg) IsArg()
func (Index) IsArg()
func (RegIm32) IsArg()
func (Disp20) IsArg()
func (RegIm24) IsArg()
func (Disp12) IsArg()
func (RegIm16) IsArg()
func (RegIm12) IsArg()
Parse extracts the bitfield b from i, and return it as an unsigned integer. Parse will panic if b is invalid.
func (b BitField) Parse(i uint64) uint64
Parse parses the Arg out from the given binary instruction i.
func (a argField) Parse(i uint64) Arg
ParseSigned extracts the bitfield b from i, and return it as a signed integer. ParseSigned will panic if b is invalid.
func (b BitField) ParseSigned(i uint64) int64
func (i Sign16) String(pc uint64) string
func (r RegIm16) String(pc uint64) string
func (r Index) String(pc uint64) string
func (r RegIm32) String(pc uint64) string
func (r Base) String(pc uint64) string
func (r Disp20) String(pc uint64) string
func (r Disp12) String(pc uint64) string
func (r VReg) String(pc uint64) string
func (o Op) String() string
func (i Imm) String(pc uint64) string
func (i Inst) String(pc uint64) string
func (i Sign8) String(pc uint64) string
func (r RegIm12) String(pc uint64) string
func (t ArgType) String() string
func (r RegIm24) String(pc uint64) string
func (b BitField) String() string
func (r Reg) String(pc uint64) string
func (i Mask) String(pc uint64) string
func (i Sign32) String(pc uint64) string
func (i Len) String(pc uint64) string
This function returns corresponding plan9 mnemonic for the native bitwise mnemonic.
func bitwise_op(op Op) string
This function returns corresponding extended mnemonic for the given brach on condition mnemonic.
func branchOnConditionOp(mask int, opconst Op) (op string, check bool)
This function returns corresponding extended mnemonic for the given branch on relative mnemonic.
func branch_relative_op(mask int, opconst Op) (op string, check bool)
This function parses memory operand of type D(B)
func mem_operand(args []string) string
This function parses memory operand of type D(L,B)
func mem_operandl(args []string) (string, string)
This function parses memory operand of type D(V,B)
func mem_operandv(args []string) string
This function parses memory operand of type D(X,B)
func mem_operandx(args []string) string
plan9Arg formats arg (which is the argIndex's arg in inst) according to Plan 9 rules. NOTE: because Plan9Syntax is the only caller of this func, and it receives a copy of inst, it's ok to modify inst.Args here.
func plan9Arg(inst *Inst, pc uint64, symname func(uint64) (string, uint64), arg Arg) string
removeArg removes the arg in inst.Args[index].
func removeArg(inst *Inst, index int8)
It checks whether to reverse all the args of given mnemonic or not
func reverseAllOperands(op Op) bool
It checks any 2 args of given instructions to swap or not
func reverseOperandOrder(op Op) bool
Generated with Arrow