From 7c8be227339bc94b9bbf3dd2fce971dad282150c Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 27 Aug 2020 14:08:28 -0700 Subject: [PATCH] comment out add* code until it can be tested --- src/instr_models.rs | 26 +++++++++++++------------- src/lib.rs | 34 +++++++++++++++++----------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/instr_models.rs b/src/instr_models.rs index 2547fa3..df034e1 100644 --- a/src/instr_models.rs +++ b/src/instr_models.rs @@ -38,19 +38,19 @@ macro_rules! create_instr_variants_cr { }; } -create_instr_variants_ov_cr!(add, addo, add_, addo_, i64); - -pub fn addo(inputs: InstructionInput) -> InstructionResult { - let ra = inputs.ra as i64; - let rb = inputs.rb as i64; - let (result, overflow) = ra.overflowing_add(rb); - let result = result as u64; - InstructionResult { - rt: Some(result), - overflow: Some(OverflowFlags::from_overflow(overflow)), - ..InstructionResult::default() - } -} +// create_instr_variants_ov_cr!(add, addo, add_, addo_, i64); +// +// pub fn addo(inputs: InstructionInput) -> InstructionResult { +// let ra = inputs.ra as i64; +// let rb = inputs.rb as i64; +// let (result, overflow) = ra.overflowing_add(rb); +// let result = result as u64; +// InstructionResult { +// rt: Some(result), +// overflow: Some(OverflowFlags::from_overflow(overflow)), +// ..InstructionResult::default() +// } +// } create_instr_variants_ov_cr!(divde, divdeo, divde_, divdeo_, i64); diff --git a/src/lib.rs b/src/lib.rs index 98880c2..fc2d22c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -405,23 +405,23 @@ macro_rules! instrs { } instrs! { - // add - #[enumerant = Add] - fn add(ra, rb) -> (rt) { - "add" - } - #[enumerant = AddO] - fn addo(ra, rb) -> (rt, ov) { - "addo" - } - #[enumerant = Add_] - fn add_(ra, rb) -> (rt, cr0) { - "add." - } - #[enumerant = AddO_] - fn addo_(ra, rb) -> (rt, ov, cr0) { - "addo." - } + // // add + // #[enumerant = Add] + // fn add(ra, rb) -> (rt) { + // "add" + // } + // #[enumerant = AddO] + // fn addo(ra, rb) -> (rt, ov) { + // "addo" + // } + // #[enumerant = Add_] + // fn add_(ra, rb) -> (rt, cr0) { + // "add." + // } + // #[enumerant = AddO_] + // fn addo_(ra, rb) -> (rt, ov, cr0) { + // "addo." + // } // divde #[enumerant = DivDE] -- 2.30.2