Skip to content

Commit

Permalink
added some more, sorry
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenny Witham committed Feb 9, 2017
1 parent 55c5b4d commit bffda9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions bpred.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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)
{
Expand All @@ -1008,5 +1011,5 @@ bpred_update(struct bpred_t *pred, /* branch predictor instance */
}
}

//TODO: add mine maybe

}
3 changes: 2 additions & 1 deletion bpred.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit bffda9a

Please sign in to comment.