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

Function predictor_stats_tracked

crates/virtual-machine/tests/vm_pipeline.rs:421–439  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

419 nop(), // gap (no load-use)
420 nop(), // gap
421 lw(3, 2, -8), // x3 = mem[sp-8]
422 addi(17, 0, 93),
423 addi(10, 0, 0),
424 ecall(),
425 ];
426 let mut cpu = load_program(&mut bus, RAM_BASE, &prog);
427
428 let outcome = run_n(&mut cpu, &mut bus, 80);
429 assert!(matches!(outcome, TickOutcome::Halted(0)));
430
431 assert_eq!(cpu.peek_reg(1), 77);
432 assert_eq!(
433 cpu.peek_reg(3),
434 77,
435 "load after store must read written value"
436 );
437}
438
439// --- Test 10: Branch predictor statistics ---
440
441#[test]
442fn predictor_stats_tracked() {

Callers

nothing calls this directly

Calls 7

generate_rom_imageFunction · 0.85
addiFunction · 0.85
beqFunction · 0.85
ecallFunction · 0.85
load_programFunction · 0.85
run_nFunction · 0.85
predictor_statsMethod · 0.45

Tested by

no test coverage detected