You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
448 B
21 lines
448 B
|
|
|
|
use crate::asm::instr::op::{EvalRes, OpTrait};
|
|
use crate::runtime::fault::Fault;
|
|
|
|
use crate::runtime::run_thread::RunThread;
|
|
|
|
impl RunThread {
|
|
// TODO unit tests
|
|
pub fn eval_op(&mut self) -> Result<EvalRes, Fault> {
|
|
|
|
let state = &mut self.state;
|
|
let info = &self.info;
|
|
|
|
let op = info.program.read(state.frame.pc);
|
|
|
|
trace!("### {:04} : {:?}", state.frame.pc.0, op);
|
|
|
|
op.execute(info, state)
|
|
}
|
|
}
|
|
|