Remove some debug messages i forgot
This commit is contained in:
@@ -93,19 +93,12 @@ pub fn auipc(core: &mut Core, instr: Instruction) -> InstructionResult {
|
|||||||
|
|
||||||
pub fn jal(core: &mut Core, instr: Instruction) -> InstructionResult {
|
pub fn jal(core: &mut Core, instr: Instruction) -> InstructionResult {
|
||||||
core.reg_write(instr.rd(), core.pc.wrapping_add(4));
|
core.reg_write(instr.rd(), core.pc.wrapping_add(4));
|
||||||
eprintln!("set x{} to {:x}", instr.rd(), core.pc.wrapping_add(4));
|
|
||||||
core.pc = core.pc.wrapping_add(instr.imm_j());
|
core.pc = core.pc.wrapping_add(instr.imm_j());
|
||||||
InstructionResult::Normal
|
InstructionResult::Normal
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn jalr(core: &mut Core, instr: Instruction) -> InstructionResult {
|
pub fn jalr(core: &mut Core, instr: Instruction) -> InstructionResult {
|
||||||
core.reg_write(instr.rd(), core.pc.wrapping_add(4));
|
core.reg_write(instr.rd(), core.pc.wrapping_add(4));
|
||||||
eprintln!(
|
|
||||||
"origin: {:x}, reg: x{}={:x}",
|
|
||||||
core.pc,
|
|
||||||
instr.rs1(),
|
|
||||||
core.reg_read(instr.rs1())
|
|
||||||
);
|
|
||||||
core.pc = core.reg_read(instr.rs1()).wrapping_add(instr.imm_i());
|
core.pc = core.reg_read(instr.rs1()).wrapping_add(instr.imm_i());
|
||||||
InstructionResult::Normal
|
InstructionResult::Normal
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user