Skip to content

Commit

Permalink
[dependencies] boot xv6 failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf committed May 15, 2024
1 parent 5eb80e6 commit 62b5439
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Binary file added dependencies/xv6/fs.img
Binary file not shown.
Binary file added dependencies/xv6/kernel
Binary file not shown.
Binary file added dependencies/xv6/kernel.bin
Binary file not shown.
12 changes: 6 additions & 6 deletions src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1011,12 +1011,12 @@ impl Cpu {
/// Execute a general-purpose instruction. Raises an exception if something is wrong,
/// otherwise, returns a fetched instruction. It also increments the program counter by 4 bytes.
fn execute_general(&mut self, inst: u64) -> Result<(), Exception> {
match self.inst.set_bits(inst as u32) {
Ok(_) => {}
Err(_) => {
panic!("unknown inst, pc: {:x}, inst: {:x}", self.pc, self.inst.bits);
}
}
// match self.inst.set_bits(inst as u32) {
// Ok(_) => {}
// Err(_) => {
// panic!("unknown inst, pc: {:x}, inst: {:x}", self.pc, self.inst.bits);
// }
// }
// 2. Decode.
let opcode = inst & 0x0000007f;
// let rd = self.inst.rd as u64;
Expand Down

0 comments on commit 62b5439

Please sign in to comment.