summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 48ce998..bbf89b6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -3,12 +3,12 @@ pub mod mem;
pub mod state;
use crate::core::*;
+use crate::mem::Memory;
+use crate::state::CpuState;
use std::collections::HashSet;
use std::io;
use std::io::Write;
use std::process::exit;
-use crate::mem::Memory;
-use crate::state::CpuState;
const MEMORY_SIZE: usize = 64 * 1024 * 1024;
const REGISTER_NAME_WIDTH: u32 = 0b11111;
@@ -201,8 +201,7 @@ fn handle_instruction(state: &mut CpuState) {
// ecall
eprintln!(
"TRAP! syscall {} with gp state {:?}",
- state.registers[17],
- pc
+ state.registers[17], pc
);
} // ecall (ebreak not implemented)
0b0101111 => {
@@ -321,4 +320,4 @@ fn handle_instruction(state: &mut CpuState) {
}
state.pc += 4;
-} \ No newline at end of file
+}