use crate::uarch::bpred::direction::{DirectionPredictor, Jump, Retired};
#[derive(Debug, Default)]
pub struct StaticPredictor;
impl StaticPredictor {
pub const fn new() -> Self {
Self
}
}
impl DirectionPredictor for StaticPredictor {
type History = ();
fn lookup(&self, _pc: u64, _target: u64) -> (bool, ()) {
(false, ())
}
fn unconditional(&self, _pc: u64, _jump: Jump) {}
fn update_histories(&mut self, _pc: u64, _taken: bool, _history: &()) {}
fn squash(&mut self, _history: &()) {}
fn correct(&mut self, _pc: u64, _taken: bool, _history: &()) {}
fn commit(&mut self, _pc: u64, _retired: Retired, _history: &()) {}
}