From a08ef23ab66c547a2a086b136da184fdc0ec744d Mon Sep 17 00:00:00 2001 From: Richard Patel Date: Sun, 8 Aug 2021 18:55:05 +0200 Subject: [PATCH] remove unused print instruction --- src/main.rs | 232 ---------------------------------------------------- 1 file changed, 232 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9c44a41..8478330 100644 --- a/src/main.rs +++ b/src/main.rs @@ -243,238 +243,6 @@ impl Default for Opcode { } } -impl Opcode { - /* - fn name(self) -> &'static str { - match self { - Self::Illegal => "", - Self::Twi => "twi", - Self::PsCmpu0 => "ps_cmpu0", - Self::PsqLx => "psq_lx", - Self::PsqStx => "psq_stx", - Self::PsSum0 => "ps_sum0", - Self::PsSum1 => "ps_sum1", - Self::PsMuls0 => "ps_muls0", - Self::PsMuls1 => "ps_muls1", - Self::PsMadds0 => "ps_madds0", - Self::PsMadds1 => "ps_madds1", - Self::PsDiv => "ps_div", - Self::PsSub => "ps_sub", - Self::PsAdd => "ps_add", - Self::PsSel => "ps_sel", - Self::PsRes => "ps_res", - Self::PsMul => "ps_mul", - Self::PsRsqrte => "ps_rsqrte", - Self::PsMsub => "ps_msub", - Self::PsMadd => "ps_madd", - Self::PsNmsub => "ps_nmsub", - Self::PsNmadd => "ps_nmadd", - Self::PsCmpo0 => "ps_cmpo0", - Self::PsqLux => "psq_lux", - Self::PsqStux => "psq_stux", - Self::PsNeg => "ps_neg", - Self::PsCmpu1 => "ps_cmpu1", - Self::PsMr => "ps_mr", - Self::PsCmpo1 => "ps_cmpo1", - Self::PsNabs => "ps_nabs", - Self::PsAbs => "ps_abs", - Self::PsMerge00 => "ps_merge00", - Self::PsMerge01 => "ps_merge01", - Self::PsMerge10 => "ps_merge10", - Self::PsMerge11 => "ps_merge11", - Self::DcbzL => "dcbz_l", - Self::Mulli => "mulli", - Self::Subfic => "subfic", - Self::Cmpli => "cmpli", - Self::Cmpi => "cmpi", - Self::Addic => "addic", - Self::Addic_ => "addic.", - Self::Addi => "addi", - Self::Addis => "addis", - Self::Bc => "bc", - Self::Sc => "sc", - Self::B => "b", - Self::Mcrf => "mcrf", - Self::Bclr => "bclr", - Self::Crnor => "crnor", - Self::Rfi => "rfi", - Self::Crandc => "crandc", - Self::Isync => "isync", - Self::Crxor => "crxor", - Self::Crnand => "crnand", - Self::Crand => "crand", - Self::Creqv => "creqv", - Self::Crorc => "crorc", - Self::Cror => "cror", - Self::Bcctr => "bcctr", - Self::Rlwimi => "rlwimi", - Self::Rlwinm => "rlwinm", - Self::Rlwnm => "rlwnm", - Self::Ori => "ori", - Self::Oris => "oris", - Self::Xori => "xori", - Self::Xoris => "xoris", - Self::Andi_ => "andi.", - Self::Andis_ => "andis.", - Self::Cmp => "cmp", - Self::Tw => "tw", - Self::Subfc => "subfc", - Self::Addc => "addc", - Self::Mulhwu => "mulhwu", - Self::Mfcr => "mfcr", - Self::Lwarx => "lwarx", - Self::Lwzx => "lwzx", - Self::Slw => "slw", - Self::Cntlzw => "cntlzw", - Self::And => "and", - Self::Cmpl => "cmpl", - Self::Subf => "subf", - Self::Dcbst => "dcbst", - Self::Lwzux => "lwzux", - Self::Andc => "andc", - Self::Mulhw => "mulhw", - Self::Mfmsr => "mfmsr", - Self::Dcbf => "dcbf", - Self::Lbzx => "lbzx", - Self::Neg => "neg", - Self::Lbzux => "lbzux", - Self::Nor => "nor", - Self::Subfe => "subfe", - Self::Adde => "adde", - Self::Mtcrf => "mtcrf", - Self::Mtmsr => "mtmsr", - Self::Stwcx_ => "stwcx_", - Self::Stwx => "stwx", - Self::Stwux => "stwux", - Self::Subfze => "subfze", - Self::Addze => "addze", - Self::Mtsr => "mtsr", - Self::Stbx => "stbx", - Self::Subfme => "subfme", - Self::Addme => "addme", - Self::Mullw => "mullw", - Self::Mtsrin => "mtsrin", - Self::Dcbtst => "dcbtst", - Self::Stbux => "stbux", - Self::Add => "add", - Self::Dcbt => "dcbt", - Self::Lhzx => "lhzx", - Self::Eqv => "eqv", - Self::Tlbie => "tlbie", - Self::Eciwx => "eciwx", - Self::Lhzux => "lhzux", - Self::Xor => "xor", - Self::Mfspr => "mfspr", - Self::Lhax => "lhax", - Self::Mftb => "mftb", - Self::Lhaux => "lhaux", - Self::Sthx => "sthx", - Self::Orc => "orc", - Self::Ecowx => "ecowx", - Self::Sthux => "sthux", - Self::Or => "or", - Self::Divwu => "divwu", - Self::Mtspr => "mtspr", - Self::Dcbi => "dcbi", - Self::Nand => "nand", - Self::Divw => "divw", - Self::Mcrxr => "mcrxr", - Self::Lswx => "lswx", - Self::Lwbrx => "lwbrx", - Self::Lfsx => "lfsx", - Self::Srw => "srw", - Self::Tlbsync => "tlbsync", - Self::Lfsux => "lfsux", - Self::Mfsr => "mfsr", - Self::Lswi => "Lswi", - Self::Sync => "sync", - Self::Lfdx => "lfdx", - Self::Lfdux => "lfdux", - Self::Mfsrin => "mfsrin", - Self::Stswx => "stswx", - Self::Stwbrx => "stwbrx", - Self::Stfsx => "stfsx", - Self::Stfsux => "stfsux", - Self::Stswi => "stswi", - Self::Stfdx => "stfdx", - Self::Stfdux => "stfdux", - Self::Lhbrx => "Lhbrx", - Self::Sraw => "sraw", - Self::Srawi => "srawi", - Self::Eieio => "eieio", - Self::Sthbrx => "sthbrx", - Self::Extsh => "extsh", - Self::Extsb => "extsb", - Self::Icbi => "icbi", - Self::Stfiwx => "stfiwx", - Self::Dcbz => "dcbz", - Self::Lwz => "lwz", - Self::Lwzu => "lwzu", - Self::Lbz => "lbz", - Self::Lbzu => "lbzu", - Self::Stw => "stw", - Self::Stwu => "stwu", - Self::Stb => "stb", - Self::Stbu => "stbu", - Self::Lhz => "lhz", - Self::Lhzu => "lhzu", - Self::Lha => "lha", - Self::Lhau => "lhau", - Self::Sth => "sth", - Self::Sthu => "sthu", - Self::Lmw => "lmw", - Self::Stmw => "stmw", - Self::Lfs => "lfs", - Self::Lfsu => "lfsu", - Self::Lfd => "lfd", - Self::Lfdu => "lfdu", - Self::Stfs => "stfs", - Self::Stfsu => "stfsu", - Self::Stfd => "stfd", - Self::Stfdu => "stfdu", - Self::PsqL => "psq_l", - Self::PsqLu => "psq_lu", - Self::Fdivs => "fdivsx", - Self::Fsubs => "fsubsx", - Self::Fadds => "fadds", - Self::Fres => "fresx", - Self::Fmuls => "fmulsx", - Self::Fmsubs => "fmsubsx", - Self::Fmadds => "fmaddsx", - Self::Fnmsubs => "fnmsubsx", - Self::Fnmadds => "fnmaddsx", - Self::PsqSt => "psq_st", - Self::PsqStu => "psq_stu", - Self::Fcmpu => "fcmpu", - Self::Frsp => "frspx", - Self::Fctiw => "fctiw", - Self::Fctiwz => "fctiwz", - Self::Fdiv => "fdivx", - Self::Fsub => "fsubx", - Self::Fadd => "fadd", - Self::Fsel => "fselx", - Self::Fmul => "fmulx", - Self::Frsqrte => "frsqrte", - Self::Fmsub => "fmsubx", - Self::Fmadd => "fmaddx", - Self::Fnmsub => "fnmsubx", - Self::Fnmadd => "fnmaddx", - Self::Fcmpo => "fcmpo", - Self::Mtfsb1 => "mtfsb1", - Self::Fneg => "fnegx", - Self::Mcrfs => "mcrfs", - Self::Mtfsb0 => "mtfsb0", - Self::Fmr => "fmrx", - Self::Mtfsfi => "mtfsfi", - Self::Fnabs => "fnabsx", - Self::Fabs => "fabs", - Self::Mffs => "mffs", - Self::Mtfsf => "mtfsf", - } - } - */ -} - #[derive(Default, Clone)] struct Ins { code: u32, // 0..32