#pragma once

namespace rx::cell::ppu {
enum class Opcode {
  Invalid,

  MFVSCR,
  MTVSCR,
  VADDCUW,
  VADDFP,
  VADDSBS,
  VADDSHS,
  VADDSWS,
  VADDUBM,
  VADDUBS,
  VADDUHM,
  VADDUHS,
  VADDUWM,
  VADDUWS,
  VAND,
  VANDC,
  VAVGSB,
  VAVGSH,
  VAVGSW,
  VAVGUB,
  VAVGUH,
  VAVGUW,
  VCFSX,
  VCFUX,
  VCMPBFP,
  VCMPBFP_,
  VCMPEQFP,
  VCMPEQFP_,
  VCMPEQUB,
  VCMPEQUB_,
  VCMPEQUH,
  VCMPEQUH_,
  VCMPEQUW,
  VCMPEQUW_,
  VCMPGEFP,
  VCMPGEFP_,
  VCMPGTFP,
  VCMPGTFP_,
  VCMPGTSB,
  VCMPGTSB_,
  VCMPGTSH,
  VCMPGTSH_,
  VCMPGTSW,
  VCMPGTSW_,
  VCMPGTUB,
  VCMPGTUB_,
  VCMPGTUH,
  VCMPGTUH_,
  VCMPGTUW,
  VCMPGTUW_,
  VCTSXS,
  VCTUXS,
  VEXPTEFP,
  VLOGEFP,
  VMADDFP,
  VMAXFP,
  VMAXSB,
  VMAXSH,
  VMAXSW,
  VMAXUB,
  VMAXUH,
  VMAXUW,
  VMHADDSHS,
  VMHRADDSHS,
  VMINFP,
  VMINSB,
  VMINSH,
  VMINSW,
  VMINUB,
  VMINUH,
  VMINUW,
  VMLADDUHM,
  VMRGHB,
  VMRGHH,
  VMRGHW,
  VMRGLB,
  VMRGLH,
  VMRGLW,
  VMSUMMBM,
  VMSUMSHM,
  VMSUMSHS,
  VMSUMUBM,
  VMSUMUHM,
  VMSUMUHS,
  VMULESB,
  VMULESH,
  VMULEUB,
  VMULEUH,
  VMULOSB,
  VMULOSH,
  VMULOUB,
  VMULOUH,
  VNMSUBFP,
  VNOR,
  VOR,
  VPERM,
  VPKPX,
  VPKSHSS,
  VPKSHUS,
  VPKSWSS,
  VPKSWUS,
  VPKUHUM,
  VPKUHUS,
  VPKUWUM,
  VPKUWUS,
  VREFP,
  VRFIM,
  VRFIN,
  VRFIP,
  VRFIZ,
  VRLB,
  VRLH,
  VRLW,
  VRSQRTEFP,
  VSEL,
  VSL,
  VSLB,
  VSLDOI,
  VSLH,
  VSLO,
  VSLW,
  VSPLTB,
  VSPLTH,
  VSPLTISB,
  VSPLTISH,
  VSPLTISW,
  VSPLTW,
  VSR,
  VSRAB,
  VSRAH,
  VSRAW,
  VSRB,
  VSRH,
  VSRO,
  VSRW,
  VSUBCUW,
  VSUBFP,
  VSUBSBS,
  VSUBSHS,
  VSUBSWS,
  VSUBUBM,
  VSUBUBS,
  VSUBUHM,
  VSUBUHS,
  VSUBUWM,
  VSUBUWS,
  VSUMSWS,
  VSUM2SWS,
  VSUM4SBS,
  VSUM4SHS,
  VSUM4UBS,
  VUPKHPX,
  VUPKHSB,
  VUPKHSH,
  VUPKLPX,
  VUPKLSB,
  VUPKLSH,
  VXOR,
  TDI,
  TWI,
  MULLI,
  SUBFIC,
  CMPLI,
  CMPI,
  ADDIC,
  ADDI,
  ADDIS,
  BC,
  SC,
  B,
  MCRF,
  BCLR,
  RFID,
  CRNOR,
  RFSCV,
  CRANDC,
  ISYNC,
  CRXOR,
  CRNAND,
  CRAND,
  HRFID,
  CREQV,
  URFID,
  STOP,
  CRORC,
  CROR,
  BCCTR,
  RLWIMI,
  RLWINM,
  RLWNM,
  ORI,
  ORIS,
  XORI,
  XORIS,
  ANDI,
  ANDIS,
  RLDICL,
  RLDICR,
  RLDIC,
  RLDIMI,
  RLDCL,
  RLDCR,
  CMP,
  TW,
  LVSL,
  LVEBX,
  SUBFC,
  MULHDU,
  ADDC,
  MULHWU,
  MFOCRF,
  LWARX,
  LDX,
  LWZX,
  SLW,
  CNTLZW,
  SLD,
  AND,
  CMPL,
  LVSR,
  LVEHX,
  SUBF,
  LDUX,
  DCBST,
  LWZUX,
  CNTLZD,
  ANDC,
  TD,
  LVEWX,
  MULHD,
  MULHW,
  LDARX,
  DCBF,
  LBZX,
  LVX,
  NEG,
  LBZUX,
  NOR,
  STVEBX,
  SUBFE,
  ADDE,
  MTOCRF,
  STDX,
  STWCX,
  STWX,
  STVEHX,
  STDUX,
  STWUX,
  STVEWX,
  SUBFZE,
  ADDZE,
  STDCX,
  STBX,
  STVX,
  MULLD,
  SUBFME,
  ADDME,
  MULLW,
  DCBTST,
  STBUX,
  ADD,
  DCBT,
  LHZX,
  EQV,
  ECIWX,
  LHZUX,
  XOR,
  MFSPR,
  LWAX,
  DST,
  LHAX,
  LVXL,
  MFTB,
  LWAUX,
  DSTST,
  LHAUX,
  STHX,
  ORC,
  ECOWX,
  STHUX,
  OR,
  DIVDU,
  DIVWU,
  MTSPR,
  DCBI,
  NAND,
  STVXL,
  DIVD,
  DIVW,
  LVLX,
  LDBRX,
  LSWX,
  LWBRX,
  LFSX,
  SRW,
  SRD,
  LVRX,
  LSWI,
  LFSUX,
  SYNC,
  LFDX,
  LFDUX,
  STVLX,
  STDBRX,
  STSWX,
  STWBRX,
  STFSX,
  STVRX,
  STFSUX,
  STSWI,
  STFDX,
  STFDUX,
  LVLXL,
  LHBRX,
  SRAW,
  SRAD,
  LVRXL,
  DSS,
  SRAWI,
  SRADI,
  EIEIO,
  STVLXL,
  STHBRX,
  EXTSH,
  STVRXL,
  EXTSB,
  STFIWX,
  EXTSW,
  ICBI,
  DCBZ,
  LWZ,
  LWZU,
  LBZ,
  LBZU,
  STW,
  STWU,
  STB,
  STBU,
  LHZ,
  LHZU,
  LHA,
  LHAU,
  STH,
  STHU,
  LMW,
  STMW,
  LFS,
  LFSU,
  LFD,
  LFDU,
  STFS,
  STFSU,
  STFD,
  STFDU,
  LD,
  LDU,
  LWA,
  STD,
  STDU,
  FDIVS,
  FSUBS,
  FADDS,
  FSQRTS,
  FRES,
  FMULS,
  FMADDS,
  FMSUBS,
  FNMSUBS,
  FNMADDS,
  MTFSB1,
  MCRFS,
  MTFSB0,
  MTFSFI,
  MFFS,
  MTFSF,
  FCMPU,
  FRSP,
  FCTIW,
  FCTIWZ,
  FDIV,
  FSUB,
  FADD,
  FSQRT,
  FSEL,
  FMUL,
  FRSQRTE,
  FMSUB,
  FMADD,
  FNMSUB,
  FNMADD,
  FCMPO,
  FNEG,
  FMR,
  FNABS,
  FABS,
  FCTID,
  FCTIDZ,
  FCFID,
  UNK,
  SUBFCO,
  ADDCO,
  SUBFO,
  NEGO,
  SUBFEO,
  ADDEO,
  SUBFZEO,
  ADDZEO,
  SUBFMEO,
  MULLDO,
  ADDMEO,
  MULLWO,
  ADDO,
  DIVDUO,
  DIVWUO,
  DIVDO,
  DIVWO,
  SUBFCO_,
  ADDCO_,
  SUBFO_,
  NEGO_,
  SUBFEO_,
  ADDEO_,
  SUBFZEO_,
  ADDZEO_,
  SUBFMEO_,
  MULLDO_,
  ADDMEO_,
  MULLWO_,
  ADDO_,
  DIVDUO_,
  DIVWUO_,
  DIVDO_,
  DIVWO_,
  RLWIMI_,
  RLWINM_,
  RLWNM_,
  RLDICL_,
  RLDICR_,
  RLDIC_,
  RLDIMI_,
  RLDCL_,
  RLDCR_,
  SUBFC_,
  MULHDU_,
  ADDC_,
  MULHWU_,
  SLW_,
  CNTLZW_,
  SLD_,
  AND_,
  SUBF_,
  CNTLZD_,
  ANDC_,
  MULHD_,
  MULHW_,
  NEG_,
  NOR_,
  SUBFE_,
  ADDE_,
  SUBFZE_,
  ADDZE_,
  MULLD_,
  SUBFME_,
  ADDME_,
  MULLW_,
  ADD_,
  EQV_,
  XOR_,
  ORC_,
  OR_,
  DIVDU_,
  DIVWU_,
  NAND_,
  DIVD_,
  DIVW_,
  SRW_,
  SRD_,
  SRAW_,
  SRAD_,
  SRAWI_,
  SRADI_,
  EXTSH_,
  EXTSB_,
  EXTSW_,
  FDIVS_,
  FSUBS_,
  FADDS_,
  FSQRTS_,
  FRES_,
  FMULS_,
  FMADDS_,
  FMSUBS_,
  FNMSUBS_,
  FNMADDS_,
  MTFSB1_,
  MTFSB0_,
  MTFSFI_,
  MFFS_,
  MTFSF_,
  FRSP_,
  FCTIW_,
  FCTIWZ_,
  FDIV_,
  FSUB_,
  FADD_,
  FSQRT_,
  FSEL_,
  FMUL_,
  FRSQRTE_,
  FMSUB_,
  FMADD_,
  FNMSUB_,
  FNMADD_,
  FNEG_,
  FMR_,
  FNABS_,
  FABS_,
  FCTID_,
  FCTIDZ_,
  FCFID_,

  // extended mnemonic
  LI,
  LIS,
  NOP,
  MR,

  CLRLDI,
  ROTLDI,
  SRDI,

  CMPD,
  CMPW,

  CMPLD,
  CMPLW,

  NOT,

  MTCRF,
  MFXER,
  MFLR,
  MFCTR,

  MFTBU,

  CCTPL,
  CCTPM,
  CCTPH,
  DB8CYC,
  DB10CYC,
  DB12CYC,
  DB16CYC,

  CRNOT,

  BDNZF,
  BDZF,
  BDNZT,
  BDZT,
  BDZ,
  BDZ_P,
  BDZ_M,
  BDNZ,
  BDNZ_P,
  BDNZ_M,
  BGE,
  BGE_P,
  BGE_M,
  BLE,
  BLE_P,
  BLE_M,
  BNE,
  BNE_P,
  BNE_M,
  BNS,
  BNS_P,
  BNS_M,
  BLT,
  BLT_P,
  BLT_M,
  BGT,
  BGT_P,
  BGT_M,
  BEQ,
  BEQ_P,
  BEQ_M,
  BSO,
  BSO_P,
  BSO_M,

  BDNZFL,
  BDZFL,
  BDNZTL,
  BDZTL,
  BDZL,
  BDZL_P,
  BDZL_M,
  BDNZL,
  BDNZL_P,
  BDNZL_M,
  BGEL,
  BGEL_P,
  BGEL_M,
  BLEL,
  BLEL_P,
  BLEL_M,
  BNEL,
  BNEL_P,
  BNEL_M,
  BNSL,
  BNSL_P,
  BNSL_M,
  BLTL,
  BLTL_P,
  BLTL_M,
  BGTL,
  BGTL_P,
  BGTL_M,
  BEQL,
  BEQL_P,
  BEQL_M,
  BSOL,
  BSOL_P,
  BSOL_M,

  BDNZFA,
  BDZFA,
  BDNZTA,
  BDZTA,
  BDZA,
  BDZA_P,
  BDZA_M,
  BDNZA,
  BDNZA_P,
  BDNZA_M,
  BGEA,
  BGEA_P,
  BGEA_M,
  BLEA,
  BLEA_P,
  BLEA_M,
  BNEA,
  BNEA_P,
  BNEA_M,
  BNSA,
  BNSA_P,
  BNSA_M,
  BLTA,
  BLTA_P,
  BLTA_M,
  BGTA,
  BGTA_P,
  BGTA_M,
  BEQA,
  BEQA_P,
  BEQA_M,
  BSOA,
  BSOA_P,
  BSOA_M,

  BDNZFLA,
  BDZFLA,
  BDNZTLA,
  BDZTLA,
  BDZLA,
  BDZLA_P,
  BDZLA_M,
  BDNZLA,
  BDNZLA_P,
  BDNZLA_M,
  BGELA,
  BGELA_P,
  BGELA_M,
  BLELA,
  BLELA_P,
  BLELA_M,
  BNELA,
  BNELA_P,
  BNELA_M,
  BNSLA,
  BNSLA_P,
  BNSLA_M,
  BLTLA,
  BLTLA_P,
  BLTLA_M,
  BGTLA,
  BGTLA_P,
  BGTLA_M,
  BEQLA,
  BEQLA_P,
  BEQLA_M,
  BSOLA,
  BSOLA_P,
  BSOLA_M,

  BDNZFLR,
  BDZFLR,
  BDNZTLR,
  BDZTLR,
  BDZLR,
  BDZLR_P,
  BDZLR_M,
  BDNZLR,
  BDNZLR_P,
  BDNZLR_M,
  BGELR,
  BGELR_P,
  BGELR_M,
  BLELR,
  BLELR_P,
  BLELR_M,
  BNELR,
  BNELR_P,
  BNELR_M,
  BNSLR,
  BNSLR_P,
  BNSLR_M,
  BLTLR,
  BLTLR_P,
  BLTLR_M,
  BGTLR,
  BGTLR_P,
  BGTLR_M,
  BEQLR,
  BEQLR_P,
  BEQLR_M,
  BSOLR,
  BSOLR_P,
  BSOLR_M,

  BDNZFCTR,
  BDZFCTR,
  BDNZTCTR,
  BDZTCTR,
  BDZCTR,
  BDZCTR_P,
  BDZCTR_M,
  BDNZCTR,
  BDNZCTR_P,
  BDNZCTR_M,
  BGECTR,
  BGECTR_P,
  BGECTR_M,
  BLECTR,
  BLECTR_P,
  BLECTR_M,
  BNECTR,
  BNECTR_P,
  BNECTR_M,
  BNSCTR,
  BNSCTR_P,
  BNSCTR_M,
  BLTCTR,
  BLTCTR_P,
  BLTCTR_M,
  BGTCTR,
  BGTCTR_P,
  BGTCTR_M,
  BEQCTR,
  BEQCTR_P,
  BEQCTR_M,
  BSOCTR,
  BSOCTR_P,
  BSOCTR_M,

  BDNZFCTRL,
  BDZFCTRL,
  BDNZTCTRL,
  BDZTCTRL,
  BDZCTRL,
  BDZCTRL_P,
  BDZCTRL_M,
  BDNZCTRL,
  BDNZCTRL_P,
  BDNZCTRL_M,
  BGECTRL,
  BGECTRL_P,
  BGECTRL_M,
  BLECTRL,
  BLECTRL_P,
  BLECTRL_M,
  BNECTRL,
  BNECTRL_P,
  BNECTRL_M,
  BNSCTRL,
  BNSCTRL_P,
  BNSCTRL_M,
  BLTCTRL,
  BLTCTRL_P,
  BLTCTRL_M,
  BGTCTRL,
  BGTCTRL_P,
  BGTCTRL_M,
  BEQCTRL,
  BEQCTRL_P,
  BEQCTRL_M,
  BSOCTRL,
  BSOCTRL_P,
  BSOCTRL_M,

  BDNZFLRL,
  BDZFLRL,
  BDNZTLRL,
  BDZTLRL,
  BDZLRL,
  BDZLRL_P,
  BDZLRL_M,
  BDNZLRL,
  BDNZLRL_P,
  BDNZLRL_M,
  BGELRL,
  BGELRL_P,
  BGELRL_M,
  BLELRL,
  BLELRL_P,
  BLELRL_M,
  BNELRL,
  BNELRL_P,
  BNELRL_M,
  BNSLRL,
  BNSLRL_P,
  BNSLRL_M,
  BLTLRL,
  BLTLRL_P,
  BLTLRL_M,
  BGTLRL,
  BGTLRL_P,
  BGTLRL_M,
  BEQLRL,
  BEQLRL_P,
  BEQLRL_M,
  BSOLRL,
  BSOLRL_P,
  BSOLRL_M,

  BL,
  BA,
  BLA,
  BCL,
  BCA,
  BCLA,
  BLR,
  BTLR,
  BFLR,
  BCTRL,
  BCCTRL,
  BTCTRL,
  BFCTRL,

  _count
};
}
