rvemu
rvemu copied to clipboard
it seems like this `!1` is suppose to be` !0b11` or `!0x3` ?
interrupt.rs line 67
// Set the program counter to the supervisor trap-handler base address (stvec)
// depending on the mode.
let vector = match cpu.state.read_bit(STVEC, 0) {
1 => 4 * cause, // vectored mode
_ => 0, // direct mode
};
-----------> cpu.pc = ((cpu.state.read(STVEC) & !1) + vector) as u64;
since MODE
consumes 2 bits, correct me if i'm wrong