renaming, cleanup, fmt, move "extension module" traits and structs into a separate mod
This commit is contained in:
@@ -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};
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}))))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user