renaming, cleanup, fmt, move "extension module" traits and structs into a separate mod

This commit is contained in:
2020-09-28 13:55:56 +02:00
parent 8222efe6da
commit 79d5aa3cd5
27 changed files with 205 additions and 209 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ use std::ops::Rem;
use num_traits::PrimInt;
use crsn::asm::instr::Cond;
use crsn::asm::instr::op::{EvalRes, OpTrait};
use crsn::module::{EvalRes, OpTrait};
use crsn::runtime::fault::Fault;
use crsn::runtime::run_thread::{state::RunState, ThreadInfo};
+4 -4
View File
@@ -1,8 +1,8 @@
use crsn::asm::data::{Rd, Wr};
use crsn::asm::error::Error;
use crsn::asm::instr::op::{AsmModule, ParseOpResult};
use crsn::asm::instr::Op;
use crsn::asm::parse::arg_parser::ArgParser;
use crsn::module::{AsmModule, ParseOpRes};
use crate::defs::ArithOp;
@@ -24,8 +24,8 @@ impl AsmModule for ArithOps {
"arith"
}
fn parse_op(&self, keyword: &str, mut args: ArgParser) -> Result<ParseOpResult, Error> {
Ok(ParseOpResult::Parsed(Op::Ext(Box::new(match keyword {
fn parse_op(&self, keyword: &str, mut args: ArgParser) -> Result<ParseOpRes, Error> {
Ok(ParseOpRes::Parsed(Op::Ext(Box::new(match keyword {
"cmp" => {
ArithOp::Compare {
a: args.next_rd()?,
@@ -448,7 +448,7 @@ impl AsmModule for ArithOps {
}
_other => {
return Ok(ParseOpResult::Unknown(args));
return Ok(ParseOpRes::Unknown(args));
}
}))))
}