MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / take_trap

Method take_trap

crates/virtual-machine/src/cpu/pipeline.rs:758–762  ·  view source on GitHub ↗
(&mut self, cause: u64, tval: u64, pc: u64)

Source from the content-addressed store, hash-verified

756
757 fn handle_mret(&mut self) {
758 let new_pc = traps::handle_mret(&mut self.regs, &mut self.csrs);
759 self.fetch_pc = new_pc;
760 self.regs.pc = new_pc;
761 self.flush_pipeline();
762 self.mret_in_flight = false; // Clear the flag after MRET completes
763 self.csrs.increment_instret();
764 self.stats.insns_retired += 1;
765 }

Callers 5

tickMethod · 0.80
stage_wbMethod · 0.80
flush_and_trapMethod · 0.80
handle_sretMethod · 0.80
handle_ecallMethod · 0.80

Calls 1

take_trapFunction · 0.85

Tested by

no test coverage detected