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

Function writeback_jump

crates/virtual-machine/tests/vm_writeback.rs:271–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269 operand: 42,
270 old_val: 0,
271 next_pc: 0x8000_0004,
272 };
273
274 let next_pc = writeback(mem_result, &mut regs, &mut csrs).expect("writeback should succeed");
275
276 // Old value (0) returned
277 assert_eq!(regs.read_x(5), 0);
278 // MHARTID is still 0 (writes ignored)
279 assert_eq!(
280 csrs.read(addr::MHARTID).expect("writeback should succeed"),
281 0
282 );
283 assert_eq!(next_pc, 0x8000_0004);
284}

Callers

nothing calls this directly

Calls 1

writebackFunction · 0.85

Tested by

no test coverage detected