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

Function writeback_write_fp

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

Source from the content-addressed store, hash-verified

45
46#[test]
47fn writeback_write_fp() {
48 let mut regs = Registers::new();
49 let mut csrs = CsrFile::new();
50
51 let bits = 0x4009_21FB_5444_2D18u64; // pi as f64
52
53 let mem_result = MemResult::WriteFp {
54 rd: 10,
55 bits,
56 next_pc: 0x8000_0004,
57 };
58
59 let next_pc = writeback(mem_result, &mut regs, &mut csrs).expect("writeback should succeed");
60
61 assert_eq!(regs.read_f_bits(10), bits);
62 assert_eq!(next_pc, 0x8000_0004);
63}
64
65// --- Writeback stage, operations with FP flags ---
66

Callers

nothing calls this directly

Calls 1

writebackFunction · 0.85

Tested by

no test coverage detected