rvemu icon indicating copy to clipboard operation
rvemu copied to clipboard

it seems like this `!1` is suppose to be` !0b11` or `!0x3` ?

Open Ma-Y opened this issue 1 year ago • 1 comments

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;

Ma-Y avatar Aug 11 '22 12:08 Ma-Y

Screen Shot 2022-08-11 at 8 41 00 PM since MODE consumes 2 bits, correct me if i'm wrong

Ma-Y avatar Aug 11 '22 12:08 Ma-Y