()
| 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] |
| 442 | fn predictor_stats_tracked() { |
nothing calls this directly
no test coverage detected