Imports #
"fmt"
"strings"
"fmt"
"io"
"strconv"
"strings"
"strconv"
"encoding/binary"
"errors"
"strings"
"fmt"
"strings"
"fmt"
"io"
"strconv"
"strings"
"strconv"
"encoding/binary"
"errors"
"strings"
const ADDconst ADDIconst ADDIWconst ADDWconst ADD_UWconst AMOADD_Dconst AMOADD_D_AQconst AMOADD_D_AQRLconst AMOADD_D_RLconst AMOADD_Wconst AMOADD_W_AQconst AMOADD_W_AQRLconst AMOADD_W_RLconst AMOAND_Dconst AMOAND_D_AQconst AMOAND_D_AQRLconst AMOAND_D_RLconst AMOAND_Wconst AMOAND_W_AQconst AMOAND_W_AQRLconst AMOAND_W_RLconst AMOMAXU_Dconst AMOMAXU_D_AQconst AMOMAXU_D_AQRLconst AMOMAXU_D_RLconst AMOMAXU_Wconst AMOMAXU_W_AQconst AMOMAXU_W_AQRLconst AMOMAXU_W_RLconst AMOMAX_Dconst AMOMAX_D_AQconst AMOMAX_D_AQRLconst AMOMAX_D_RLconst AMOMAX_Wconst AMOMAX_W_AQconst AMOMAX_W_AQRLconst AMOMAX_W_RLconst AMOMINU_Dconst AMOMINU_D_AQconst AMOMINU_D_AQRLconst AMOMINU_D_RLconst AMOMINU_Wconst AMOMINU_W_AQconst AMOMINU_W_AQRLconst AMOMINU_W_RLconst AMOMIN_Dconst AMOMIN_D_AQconst AMOMIN_D_AQRLconst AMOMIN_D_RLconst AMOMIN_Wconst AMOMIN_W_AQconst AMOMIN_W_AQRLconst AMOMIN_W_RLconst AMOOR_Dconst AMOOR_D_AQconst AMOOR_D_AQRLconst AMOOR_D_RLconst AMOOR_Wconst AMOOR_W_AQconst AMOOR_W_AQRLconst AMOOR_W_RLconst AMOSWAP_Dconst AMOSWAP_D_AQconst AMOSWAP_D_AQRLconst AMOSWAP_D_RLconst AMOSWAP_Wconst AMOSWAP_W_AQconst AMOSWAP_W_AQRLconst AMOSWAP_W_RLconst AMOXOR_Dconst AMOXOR_D_AQconst AMOXOR_D_AQRLconst AMOXOR_D_RLconst AMOXOR_Wconst AMOXOR_W_AQconst AMOXOR_W_AQRLconst AMOXOR_W_RLconst ANDconst ANDIconst ANDNconst AUIPCconst BCLRconst BCLRIconst BEQconst BEXTconst BEXTIconst BGEconst BGEUconst BINVconst BINVIconst BLTconst BLTUconst BNEconst BSETconst BSETIconst CLZconst CLZWconst CPOPconst CPOPWconst CSRRCconst CSRRCIconst CSRRSconst CSRRSIconst CSRRWconst CSRRWIconst CTZconst CTZWconst CYCLE CSR = 0x0c00const CYCLEH CSR = 0x0c80const C_ADDconst C_ADDIconst C_ADDI16SPconst C_ADDI4SPNconst C_ADDIWconst C_ADDWconst C_ANDconst C_ANDIconst C_BEQZconst C_BNEZconst C_EBREAKconst C_FLDconst C_FLDSPconst C_FSDconst C_FSDSPconst C_Jconst C_JALRconst C_JRconst C_LDconst C_LDSPconst C_LIconst C_LUIconst C_LWconst C_LWSPconst C_MVconst C_NOPconst C_ORconst C_SDconst C_SDSPconst C_SLLIconst C_SRAIconst C_SRLIconst C_SUBconst C_SUBWconst C_SWconst C_SWSPconst C_UNIMPconst C_XORconst DCSR CSR = 0x07b0const DIVconst DIVUconst DIVUWconst DIVWconst DPC CSR = 0x07b1const DSCRATCH0 CSR = 0x07b2const DSCRATCH1 CSR = 0x07b3const EBREAKconst ECALLFloat point register
const F0const F1const F10const F11const F12const F13const F14const F15const F16const F17const F18const F19const F2const F20const F21const F22const F23const F24const F25const F26const F27const F28const F29const F3const F30const F31const F4const F5const F6const F7const F8const F9const FADD_Dconst FADD_Hconst FADD_Qconst FADD_Sconst FCLASS_Dconst FCLASS_Hconst FCLASS_Qconst FCLASS_Sconst FCSR CSR = 0x0003const FCVT_D_Lconst FCVT_D_LUconst FCVT_D_Qconst FCVT_D_Sconst FCVT_D_Wconst FCVT_D_WUconst FCVT_H_Lconst FCVT_H_LUconst FCVT_H_Sconst FCVT_H_Wconst FCVT_H_WUconst FCVT_LU_Dconst FCVT_LU_Hconst FCVT_LU_Qconst FCVT_LU_Sconst FCVT_L_Dconst FCVT_L_Hconst FCVT_L_Qconst FCVT_L_Sconst FCVT_Q_Dconst FCVT_Q_Lconst FCVT_Q_LUconst FCVT_Q_Sconst FCVT_Q_Wconst FCVT_Q_WUconst FCVT_S_Dconst FCVT_S_Hconst FCVT_S_Lconst FCVT_S_LUconst FCVT_S_Qconst FCVT_S_Wconst FCVT_S_WUconst FCVT_WU_Dconst FCVT_WU_Hconst FCVT_WU_Qconst FCVT_WU_Sconst FCVT_W_Dconst FCVT_W_Hconst FCVT_W_Qconst FCVT_W_Sconst FDIV_Dconst FDIV_Hconst FDIV_Qconst FDIV_Sconst FENCEconst FENCE_Iconst FEQ_Dconst FEQ_Hconst FEQ_Qconst FEQ_Sconst FFLAGS CSR = 0x0001const FLDconst FLE_Dconst FLE_Hconst FLE_Qconst FLE_Sconst FLHconst FLQconst FLT_Dconst FLT_Hconst FLT_Qconst FLT_Sconst FLWconst FMADD_Dconst FMADD_Hconst FMADD_Qconst FMADD_Sconst FMAX_Dconst FMAX_Hconst FMAX_Qconst FMAX_Sconst FMIN_Dconst FMIN_Hconst FMIN_Qconst FMIN_Sconst FMSUB_Dconst FMSUB_Hconst FMSUB_Qconst FMSUB_Sconst FMUL_Dconst FMUL_Hconst FMUL_Qconst FMUL_Sconst FMV_D_Xconst FMV_H_Xconst FMV_W_Xconst FMV_X_Dconst FMV_X_Hconst FMV_X_Wconst FNMADD_Dconst FNMADD_Hconst FNMADD_Qconst FNMADD_Sconst FNMSUB_Dconst FNMSUB_Hconst FNMSUB_Qconst FNMSUB_Sconst FRM CSR = 0x0002const FSDconst FSGNJN_Dconst FSGNJN_Hconst FSGNJN_Qconst FSGNJN_Sconst FSGNJX_Dconst FSGNJX_Hconst FSGNJX_Qconst FSGNJX_Sconst FSGNJ_Dconst FSGNJ_Hconst FSGNJ_Qconst FSGNJ_Sconst FSHconst FSQconst FSQRT_Dconst FSQRT_Hconst FSQRT_Qconst FSQRT_Sconst FSUB_Dconst FSUB_Hconst FSUB_Qconst FSUB_Sconst FSWconst HCOUNTEREN CSR = 0x0606const HEDELEG CSR = 0x0602const HGATP CSR = 0x0680const HGEIE CSR = 0x0607const HGEIP CSR = 0x0e12const HIDELEG CSR = 0x0603const HIE CSR = 0x0604const HIP CSR = 0x0644const HPMCOUNTER10 CSR = 0x0c0aconst HPMCOUNTER10H CSR = 0x0c8aconst HPMCOUNTER11 CSR = 0x0c0bconst HPMCOUNTER11H CSR = 0x0c8bconst HPMCOUNTER12 CSR = 0x0c0cconst HPMCOUNTER12H CSR = 0x0c8cconst HPMCOUNTER13 CSR = 0x0c0dconst HPMCOUNTER13H CSR = 0x0c8dconst HPMCOUNTER14 CSR = 0x0c0econst HPMCOUNTER14H CSR = 0x0c8econst HPMCOUNTER15 CSR = 0x0c0fconst HPMCOUNTER15H CSR = 0x0c8fconst HPMCOUNTER16 CSR = 0x0c10const HPMCOUNTER16H CSR = 0x0c90const HPMCOUNTER17 CSR = 0x0c11const HPMCOUNTER17H CSR = 0x0c91const HPMCOUNTER18 CSR = 0x0c12const HPMCOUNTER18H CSR = 0x0c92const HPMCOUNTER19 CSR = 0x0c13const HPMCOUNTER19H CSR = 0x0c93const HPMCOUNTER20 CSR = 0x0c14const HPMCOUNTER20H CSR = 0x0c94const HPMCOUNTER21 CSR = 0x0c15const HPMCOUNTER21H CSR = 0x0c95const HPMCOUNTER22 CSR = 0x0c16const HPMCOUNTER22H CSR = 0x0c96const HPMCOUNTER23 CSR = 0x0c17const HPMCOUNTER23H CSR = 0x0c97const HPMCOUNTER24 CSR = 0x0c18const HPMCOUNTER24H CSR = 0x0c98const HPMCOUNTER25 CSR = 0x0c19const HPMCOUNTER25H CSR = 0x0c99const HPMCOUNTER26 CSR = 0x0c1aconst HPMCOUNTER26H CSR = 0x0c9aconst HPMCOUNTER27 CSR = 0x0c1bconst HPMCOUNTER27H CSR = 0x0c9bconst HPMCOUNTER28 CSR = 0x0c1cconst HPMCOUNTER28H CSR = 0x0c9cconst HPMCOUNTER29 CSR = 0x0c1dconst HPMCOUNTER29H CSR = 0x0c9dconst HPMCOUNTER3 CSR = 0x0c03const HPMCOUNTER30 CSR = 0x0c1econst HPMCOUNTER30H CSR = 0x0c9econst HPMCOUNTER31 CSR = 0x0c1fconst HPMCOUNTER31H CSR = 0x0c9fconst HPMCOUNTER3H CSR = 0x0c83const HPMCOUNTER4 CSR = 0x0c04const HPMCOUNTER4H CSR = 0x0c84const HPMCOUNTER5 CSR = 0x0c05const HPMCOUNTER5H CSR = 0x0c85const HPMCOUNTER6 CSR = 0x0c06const HPMCOUNTER6H CSR = 0x0c86const HPMCOUNTER7 CSR = 0x0c07const HPMCOUNTER7H CSR = 0x0c87const HPMCOUNTER8 CSR = 0x0c08const HPMCOUNTER8H CSR = 0x0c88const HPMCOUNTER9 CSR = 0x0c09const HPMCOUNTER9H CSR = 0x0c89const HSTATUS CSR = 0x0600const HTIMEDELTA CSR = 0x0605const HTIMEDELTAH CSR = 0x0615const HTINST CSR = 0x064aconst HTVAL CSR = 0x0643const HVIP CSR = 0x0645const INSTRET CSR = 0x0c02const INSTRETH CSR = 0x0c82const JALconst JALRconst LBconst LBUconst LDconst LHconst LHUconst LR_Dconst LR_D_AQconst LR_D_AQRLconst LR_D_RLconst LR_Wconst LR_W_AQconst LR_W_AQRLconst LR_W_RLconst LUIconst LWconst LWUconst MARCHID CSR = 0x0f12const MAXconst MAXUconst MCAUSE CSR = 0x0342const MCONTEXT CSR = 0x07a8const MCOUNTEREN CSR = 0x0306const MCOUNTINHIBIT CSR = 0x0320const MCYCLE CSR = 0x0b00const MCYCLEH CSR = 0x0b80const MEDELEG CSR = 0x0302const MENTROPY CSR = 0x0f15const MEPC CSR = 0x0341const MHARTID CSR = 0x0f14const MHPMCOUNTER10 CSR = 0x0b0aconst MHPMCOUNTER10H CSR = 0x0b8aconst MHPMCOUNTER11 CSR = 0x0b0bconst MHPMCOUNTER11H CSR = 0x0b8bconst MHPMCOUNTER12 CSR = 0x0b0cconst MHPMCOUNTER12H CSR = 0x0b8cconst MHPMCOUNTER13 CSR = 0x0b0dconst MHPMCOUNTER13H CSR = 0x0b8dconst MHPMCOUNTER14 CSR = 0x0b0econst MHPMCOUNTER14H CSR = 0x0b8econst MHPMCOUNTER15 CSR = 0x0b0fconst MHPMCOUNTER15H CSR = 0x0b8fconst MHPMCOUNTER16 CSR = 0x0b10const MHPMCOUNTER16H CSR = 0x0b90const MHPMCOUNTER17 CSR = 0x0b11const MHPMCOUNTER17H CSR = 0x0b91const MHPMCOUNTER18 CSR = 0x0b12const MHPMCOUNTER18H CSR = 0x0b92const MHPMCOUNTER19 CSR = 0x0b13const MHPMCOUNTER19H CSR = 0x0b93const MHPMCOUNTER20 CSR = 0x0b14const MHPMCOUNTER20H CSR = 0x0b94const MHPMCOUNTER21 CSR = 0x0b15const MHPMCOUNTER21H CSR = 0x0b95const MHPMCOUNTER22 CSR = 0x0b16const MHPMCOUNTER22H CSR = 0x0b96const MHPMCOUNTER23 CSR = 0x0b17const MHPMCOUNTER23H CSR = 0x0b97const MHPMCOUNTER24 CSR = 0x0b18const MHPMCOUNTER24H CSR = 0x0b98const MHPMCOUNTER25 CSR = 0x0b19const MHPMCOUNTER25H CSR = 0x0b99const MHPMCOUNTER26 CSR = 0x0b1aconst MHPMCOUNTER26H CSR = 0x0b9aconst MHPMCOUNTER27 CSR = 0x0b1bconst MHPMCOUNTER27H CSR = 0x0b9bconst MHPMCOUNTER28 CSR = 0x0b1cconst MHPMCOUNTER28H CSR = 0x0b9cconst MHPMCOUNTER29 CSR = 0x0b1dconst MHPMCOUNTER29H CSR = 0x0b9dconst MHPMCOUNTER3 CSR = 0x0b03const MHPMCOUNTER30 CSR = 0x0b1econst MHPMCOUNTER30H CSR = 0x0b9econst MHPMCOUNTER31 CSR = 0x0b1fconst MHPMCOUNTER31H CSR = 0x0b9fconst MHPMCOUNTER3H CSR = 0x0b83const MHPMCOUNTER4 CSR = 0x0b04const MHPMCOUNTER4H CSR = 0x0b84const MHPMCOUNTER5 CSR = 0x0b05const MHPMCOUNTER5H CSR = 0x0b85const MHPMCOUNTER6 CSR = 0x0b06const MHPMCOUNTER6H CSR = 0x0b86const MHPMCOUNTER7 CSR = 0x0b07const MHPMCOUNTER7H CSR = 0x0b87const MHPMCOUNTER8 CSR = 0x0b08const MHPMCOUNTER8H CSR = 0x0b88const MHPMCOUNTER9 CSR = 0x0b09const MHPMCOUNTER9H CSR = 0x0b89const MHPMEVENT10 CSR = 0x032aconst MHPMEVENT11 CSR = 0x032bconst MHPMEVENT12 CSR = 0x032cconst MHPMEVENT13 CSR = 0x032dconst MHPMEVENT14 CSR = 0x032econst MHPMEVENT15 CSR = 0x032fconst MHPMEVENT16 CSR = 0x0330const MHPMEVENT17 CSR = 0x0331const MHPMEVENT18 CSR = 0x0332const MHPMEVENT19 CSR = 0x0333const MHPMEVENT20 CSR = 0x0334const MHPMEVENT21 CSR = 0x0335const MHPMEVENT22 CSR = 0x0336const MHPMEVENT23 CSR = 0x0337const MHPMEVENT24 CSR = 0x0338const MHPMEVENT25 CSR = 0x0339const MHPMEVENT26 CSR = 0x033aconst MHPMEVENT27 CSR = 0x033bconst MHPMEVENT28 CSR = 0x033cconst MHPMEVENT29 CSR = 0x033dconst MHPMEVENT3 CSR = 0x0323const MHPMEVENT30 CSR = 0x033econst MHPMEVENT31 CSR = 0x033fconst MHPMEVENT4 CSR = 0x0324const MHPMEVENT5 CSR = 0x0325const MHPMEVENT6 CSR = 0x0326const MHPMEVENT7 CSR = 0x0327const MHPMEVENT8 CSR = 0x0328const MHPMEVENT9 CSR = 0x0329const MIDELEG CSR = 0x0303const MIE CSR = 0x0304const MIMPID CSR = 0x0f13const MINconst MINSTRET CSR = 0x0b02const MINSTRETH CSR = 0x0b82const MINTSTATUS CSR = 0x0346const MINUconst MIP CSR = 0x0344const MISA CSR = 0x0301const MNOISE CSR = 0x07a9const MNXTI CSR = 0x0345const MSCRATCH CSR = 0x0340const MSCRATCHCSW CSR = 0x0348const MSCRATCHCSWL CSR = 0x0349const MSTATUS CSR = 0x0300const MSTATUSH CSR = 0x0310const MTINST CSR = 0x034aconst MTVAL CSR = 0x0343const MTVAL2 CSR = 0x034bconst MTVEC CSR = 0x0305const MTVT CSR = 0x0307const MULconst MULHconst MULHSUconst MULHUconst MULWconst MVENDORID CSR = 0x0f11const ORconst ORC_Bconst ORIconst ORNconst PMPADDR0 CSR = 0x03b0const PMPADDR1 CSR = 0x03b1const PMPADDR10 CSR = 0x03baconst PMPADDR11 CSR = 0x03bbconst PMPADDR12 CSR = 0x03bcconst PMPADDR13 CSR = 0x03bdconst PMPADDR14 CSR = 0x03beconst PMPADDR15 CSR = 0x03bfconst PMPADDR2 CSR = 0x03b2const PMPADDR3 CSR = 0x03b3const PMPADDR4 CSR = 0x03b4const PMPADDR5 CSR = 0x03b5const PMPADDR6 CSR = 0x03b6const PMPADDR7 CSR = 0x03b7const PMPADDR8 CSR = 0x03b8const PMPADDR9 CSR = 0x03b9const PMPCFG0 CSR = 0x03a0const PMPCFG1 CSR = 0x03a1const PMPCFG2 CSR = 0x03a2const PMPCFG3 CSR = 0x03a3const REMconst REMUconst REMUWconst REMWconst REV8const ROLconst ROLWconst RORconst RORIconst RORIWconst RORWconst SATP CSR = 0x0180const SBconst SCAUSE CSR = 0x0142const SCONTEXT CSR = 0x07aaconst SCOUNTEREN CSR = 0x0106const SC_Dconst SC_D_AQconst SC_D_AQRLconst SC_D_RLconst SC_Wconst SC_W_AQconst SC_W_AQRLconst SC_W_RLconst SDconst SEDELEG CSR = 0x0102const SEPC CSR = 0x0141const SEXT_Bconst SEXT_Hconst SHconst SH1ADDconst SH1ADD_UWconst SH2ADDconst SH2ADD_UWconst SH3ADDconst SH3ADD_UWconst SIDELEG CSR = 0x0103const SIE CSR = 0x0104const SINTSTATUS CSR = 0x0146const SIP CSR = 0x0144const SLLconst SLLIconst SLLIWconst SLLI_UWconst SLLWconst SLTconst SLTIconst SLTIUconst SLTUconst SNXTI CSR = 0x0145const SRAconst SRAIconst SRAIWconst SRAWconst SRLconst SRLIconst SRLIWconst SRLWconst SSCRATCH CSR = 0x0140const SSCRATCHCSW CSR = 0x0148const SSCRATCHCSWL CSR = 0x0149const SSTATUS CSR = 0x0100const STVAL CSR = 0x0143const STVEC CSR = 0x0105const STVT CSR = 0x0107const SUBconst SUBWconst SWconst TCONTROL CSR = 0x07a5const TDATA1 CSR = 0x07a1const TDATA2 CSR = 0x07a2const TDATA3 CSR = 0x07a3const TIME CSR = 0x0c01const TIMEH CSR = 0x0c81const TINFO CSR = 0x07a4const TSELECT CSR = 0x07a0const UCAUSE CSR = 0x0042const UEPC CSR = 0x0041const UIE CSR = 0x0004const UINTSTATUS CSR = 0x0046const UIP CSR = 0x0044const UNXTI CSR = 0x0045const USCRATCH CSR = 0x0040const USCRATCHCSW CSR = 0x0048const USCRATCHCSWL CSR = 0x0049Control status register
const USTATUS CSR = 0x0000const UTVAL CSR = 0x0043const UTVEC CSR = 0x0005const UTVT CSR = 0x0007const VCSR CSR = 0x000fconst VL CSR = 0x0c20const VLENB CSR = 0x0c22const VSATP CSR = 0x0280const VSCAUSE CSR = 0x0242const VSEPC CSR = 0x0241const VSIE CSR = 0x0204const VSIP CSR = 0x0244const VSSCRATCH CSR = 0x0240const VSSTATUS CSR = 0x0200const VSTART CSR = 0x0008const VSTVAL CSR = 0x0243const VSTVEC CSR = 0x0205const VTYPE CSR = 0x0c21const VXRM CSR = 0x000aconst VXSAT CSR = 0x0009General-purpose register
const X0 Reg = iotaconst X1const X10const X11const X12const X13const X14const X15const X16const X17const X18const X19const X2const X20const X21const X22const X23const X24const X25const X26const X27const X28const X29const X3const X30const X31const X4const X5const X6const X7const X8const X9const XNORconst XORconst XORIconst ZEXT_Hconst _ Op = iotaconst _ argType = iotavar _CSR_map = map[CSR]string{...}const _CSR_name = "USTATUSFFLAGSFRMFCSRUIEUTVECUTVTVSTARTVXSATVXRMVCSRUSCRATCHUEPCUCAUSEUTVALUIPUNXTIUINTSTATUSUSCRATCHCSWUSCRATCHCSWLSSTATUSSEDELEGSIDELEGSIESTVECSCOUNTERENSTVTSSCRATCHSEPCSCAUSESTVALSIPSNXTISINTSTATUSSSCRATCHCSWSSCRATCHCSWLSATPVSSTATUSVSIEVSTVECVSSCRATCHVSEPCVSCAUSEVSTVALVSIPVSATPMSTATUSMISAMEDELEGMIDELEGMIEMTVECMCOUNTERENMTVTMSTATUSHMCOUNTINHIBITMHPMEVENT3MHPMEVENT4MHPMEVENT5MHPMEVENT6MHPMEVENT7MHPMEVENT8MHPMEVENT9MHPMEVENT10MHPMEVENT11MHPMEVENT12MHPMEVENT13MHPMEVENT14MHPMEVENT15MHPMEVENT16MHPMEVENT17MHPMEVENT18MHPMEVENT19MHPMEVENT20MHPMEVENT21MHPMEVENT22MHPMEVENT23MHPMEVENT24MHPMEVENT25MHPMEVENT26MHPMEVENT27MHPMEVENT28MHPMEVENT29MHPMEVENT30MHPMEVENT31MSCRATCHMEPCMCAUSEMTVALMIPMNXTIMINTSTATUSMSCRATCHCSWMSCRATCHCSWLMTINSTMTVAL2PMPCFG0PMPCFG1PMPCFG2PMPCFG3PMPADDR0PMPADDR1PMPADDR2PMPADDR3PMPADDR4PMPADDR5PMPADDR6PMPADDR7PMPADDR8PMPADDR9PMPADDR10PMPADDR11PMPADDR12PMPADDR13PMPADDR14PMPADDR15HSTATUSHEDELEGHIDELEGHIEHTIMEDELTAHCOUNTERENHGEIEHTIMEDELTAHHTVALHIPHVIPHTINSTHGATPTSELECTTDATA1TDATA2TDATA3TINFOTCONTROLMCONTEXTMNOISESCONTEXTDCSRDPCDSCRATCH0DSCRATCH1MCYCLEMINSTRETMHPMCOUNTER3MHPMCOUNTER4MHPMCOUNTER5MHPMCOUNTER6MHPMCOUNTER7MHPMCOUNTER8MHPMCOUNTER9MHPMCOUNTER10MHPMCOUNTER11MHPMCOUNTER12MHPMCOUNTER13MHPMCOUNTER14MHPMCOUNTER15MHPMCOUNTER16MHPMCOUNTER17MHPMCOUNTER18MHPMCOUNTER19MHPMCOUNTER20MHPMCOUNTER21MHPMCOUNTER22MHPMCOUNTER23MHPMCOUNTER24MHPMCOUNTER25MHPMCOUNTER26MHPMCOUNTER27MHPMCOUNTER28MHPMCOUNTER29MHPMCOUNTER30MHPMCOUNTER31MCYCLEHMINSTRETHMHPMCOUNTER3HMHPMCOUNTER4HMHPMCOUNTER5HMHPMCOUNTER6HMHPMCOUNTER7HMHPMCOUNTER8HMHPMCOUNTER9HMHPMCOUNTER10HMHPMCOUNTER11HMHPMCOUNTER12HMHPMCOUNTER13HMHPMCOUNTER14HMHPMCOUNTER15HMHPMCOUNTER16HMHPMCOUNTER17HMHPMCOUNTER18HMHPMCOUNTER19HMHPMCOUNTER20HMHPMCOUNTER21HMHPMCOUNTER22HMHPMCOUNTER23HMHPMCOUNTER24HMHPMCOUNTER25HMHPMCOUNTER26HMHPMCOUNTER27HMHPMCOUNTER28HMHPMCOUNTER29HMHPMCOUNTER30HMHPMCOUNTER31HCYCLETIMEINSTRETHPMCOUNTER3HPMCOUNTER4HPMCOUNTER5HPMCOUNTER6HPMCOUNTER7HPMCOUNTER8HPMCOUNTER9HPMCOUNTER10HPMCOUNTER11HPMCOUNTER12HPMCOUNTER13HPMCOUNTER14HPMCOUNTER15HPMCOUNTER16HPMCOUNTER17HPMCOUNTER18HPMCOUNTER19HPMCOUNTER20HPMCOUNTER21HPMCOUNTER22HPMCOUNTER23HPMCOUNTER24HPMCOUNTER25HPMCOUNTER26HPMCOUNTER27HPMCOUNTER28HPMCOUNTER29HPMCOUNTER30HPMCOUNTER31VLVTYPEVLENBCYCLEHTIMEHINSTRETHHPMCOUNTER3HHPMCOUNTER4HHPMCOUNTER5HHPMCOUNTER6HHPMCOUNTER7HHPMCOUNTER8HHPMCOUNTER9HHPMCOUNTER10HHPMCOUNTER11HHPMCOUNTER12HHPMCOUNTER13HHPMCOUNTER14HHPMCOUNTER15HHPMCOUNTER16HHPMCOUNTER17HHPMCOUNTER18HHPMCOUNTER19HHPMCOUNTER20HHPMCOUNTER21HHPMCOUNTER22HHPMCOUNTER23HHPMCOUNTER24HHPMCOUNTER25HHPMCOUNTER26HHPMCOUNTER27HHPMCOUNTER28HHPMCOUNTER29HHPMCOUNTER30HHPMCOUNTER31HHGEIPMVENDORIDMARCHIDMIMPIDMHARTIDMENTROPY"const arg_bimm12const arg_c_bimm9const arg_c_fs2const arg_c_imm12const arg_c_imm6const arg_c_nzimm10const arg_c_nzimm18const arg_c_nzimm6const arg_c_nzuimm10const arg_c_nzuimm6const arg_c_rs1_n0const arg_c_rs2const arg_c_rs2_n0const arg_c_uimm7const arg_c_uimm8const arg_c_uimm8spconst arg_c_uimm8sp_sconst arg_c_uimm9spconst arg_c_uimm9sp_sconst arg_csrconst arg_fdconst arg_fd_pconst arg_fs1const arg_fs2const arg_fs2_pconst arg_fs3const arg_imm12const arg_imm20const arg_jimm20const arg_predconst arg_rdconst arg_rd_n0const arg_rd_n2RISC-V Compressed Extension Args
const arg_rd_pconst arg_rd_rs1_n0const arg_rd_rs1_pconst arg_rs1const arg_rs1_amoconst arg_rs1_memconst arg_rs1_n0const arg_rs1_pconst arg_rs1_storeconst arg_rs2const arg_rs2_pconst arg_rs3const arg_shamt5const arg_shamt6const arg_simm12const arg_succconst arg_zimmvar decoderCover []boolvar errShort = *ast.CallExprvar errUnknown = *ast.CallExprvar instFormats = [...]instFormat{...}var opstr = [...]string{...}An Args holds the instruction arguments. If an instruction has fewer than 6 arguments, the final elements in the array are nil.
type Args [6]ArgA CSR is a single control and status register. Use stringer to generate CSR match table. go:generate stringer -type=CSR
type CSR uint16A MemOrder is a memory order hint in fence instruction
type MemOrder uint8An Op is a RISC-V opcode.
type Op uint16A Reg is a single register. The zero value denotes X0, not the absence of a register.
type Reg uint16type argType uint16type argTypeList [6]argTypeAn Arg is a single instruction argument.
type Arg interface {
String() string
}An AmoReg is an atomic address register used in AMO instructions
type AmoReg struct {
reg Reg
}An Inst is a single instruction.
type Inst struct {
Op Op
Enc uint32
Args Args
Len int
}A RegOffset is a register with offset value
type RegOffset struct {
OfsReg Reg
Ofs Simm
}A Simm is a signed immediate number
type Simm struct {
Imm int32
Decimal bool
Width uint8
}An Uimm is an unsigned immediate number
type Uimm struct {
Imm uint32
Decimal bool
}An instFormat describes the format of an instruction encoding.
type instFormat struct {
mask uint32
value uint32
op Op
args argTypeList
}Decode decodes the 4 bytes in src as a single instruction.
func Decode(src []byte) (Inst, error)GNUSyntax returns the GNU assembler syntax for the instruction, as defined by GNU binutils. This form typically matches the syntax defined in the RISC-V Instruction Set Manual. See https://github.com/riscv/riscv-isa-manual/releases/download/Ratified-IMAFDQC/riscv-spec-20191213.pdf
func GNUSyntax(inst Inst) stringGoSyntax 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. The reader text should read from the text segment using text addresses as offsets; it is used to display pc-relative loads as constant loads.
func GoSyntax(inst Inst, pc uint64, symname func(uint64) (string, uint64), text io.ReaderAt) stringfunc (si Simm) String() stringfunc (r Reg) String() stringfunc (amoReg AmoReg) String() stringfunc (regofs RegOffset) String() stringfunc (memOrder MemOrder) String() stringfunc (ui Uimm) String() stringfunc (i Inst) String() stringNOTE: The actual Op values are defined in tables.go.
func (op Op) String() stringfunc (i CSR) String() stringfunc _()convertCompressedIns rewrites the RVC Instruction to regular Instructions
func convertCompressedIns(f *instFormat, args Args) ArgsdecodeArg decodes the arg described by aop from the instruction bits x. It returns nil if x cannot be decoded according to aop.
func decodeArg(aop argType, x uint32, index int) Argfunc init()func plan9Arg(inst *Inst, pc uint64, symname func(uint64) (string, uint64), arg Arg) stringGenerated with Arrow