add a procedural implementation of rename_execute_retire #12

Merged
programmerjake merged 24 commits from programmerjake/cpu:rename-execute-retire into master 2026-05-22 06:58:09 +00:00
5 changed files with 82592 additions and 85181 deletions
Showing only changes of commit e502dfe574 - Show all commits

View file

@ -581,6 +581,15 @@ impl MOpInUnitState {
Self::FinishedAndOrCausedCancel => None,
}
}
fn is_completed(self) -> bool {
match self {
Self::NotYetEnqueued => false,
Self::InputsNotReadySpeculative { .. } => false,
Self::InputsReady { .. } => false,
Self::OutputReady { .. } => false,
Self::FinishedAndOrCausedCancel => true,
}
}
}
impl fmt::Debug for MOpInUnitState {
@ -1213,7 +1222,7 @@ impl<C: PhantomConstCpuConfig> RenameExecuteRetireState<C> {
fn space_available_for_unit(&self, unit_index: usize) -> usize {
let mut retval = self.config.get().unit_max_in_flight(unit_index);
for renamed in self.rob.renamed() {
if renamed.unit_index == unit_index {
if renamed.unit_index == unit_index && !renamed.mop_in_unit_state.is_completed() {
let Some(v) = NonZero::new(retval.get() - 1) else {
return 0;
};

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff