diff --git a/bpred.c b/bpred.c index 3f41aab..669e484 100644 --- a/bpred.c +++ b/bpred.c @@ -124,12 +124,13 @@ bpred_create(enum bpred_class class, /* type of predictor to create */ panic("bogus predictor class"); } - //TODO: do something here! + //TODO: do something here! - Added mine to regular /* allocate ret-addr stack */ switch (class) { case BPredComb: case BPred2Level: case BPred2bit: + case BPredMine { int i; @@ -988,6 +989,8 @@ bpred_update(struct bpred_t *pred, /* branch predictor instance */ } } + //TODO: add update history register for mine maybe + /* update BTB (but only for taken branches) */ if (pbtb) { @@ -1008,5 +1011,5 @@ bpred_update(struct bpred_t *pred, /* branch predictor instance */ } } - //TODO: add mine maybe + } diff --git a/bpred.h b/bpred.h index fb5bfa8..43c1376 100644 --- a/bpred.h +++ b/bpred.h @@ -142,7 +142,7 @@ struct bpred_t { struct bpred_dir_t *bimod; /* first direction predictor */ struct bpred_dir_t *twolev; /* second direction predictor */ struct bpred_dir_t *meta; /* meta predictor */ - struct bpred_dir_t *mine; + struct bpred_dir_t *mine; /*My own predictor */ } dirpred; struct { @@ -175,6 +175,7 @@ struct bpred_t { counter_t ras_hits; /* num correct return-address predictions */ }; +//TODO: add mine here /* branch predictor update information */ struct bpred_update_t { char *pdir1; /* direction-1 predictor counter */