d0iasm/rvemu

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

Ma-Y opened this issue · 1 comments

Ma-Y commented

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 commented

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