> Is this piece of code necessary for generic Squashes? > I'd agree that this does not seem correct and may be something exposed with the deeper pipeline and recently changed fault-checking mechanisms.
The code should be OK with squashing all the younger instructions after either a misspeculated branch or an event that causes the pipeline to be flushed/squashed. It sounds like that code is assuming that only the first case is the squash possibility. Maybe the code should do something like this: if (pred_hist.front().seqNum != squashed_sn) { DPRINTF(InOrderBPred, "Front sn %i != Squash sn %i.\n", pred_hist.front().seqNum, squashed_sn); assert(pred_hist.front().seqNum > squashed_sn); pred_hist.erase(hist_it); return; } Since the rest of the code is updating the BTB, it seems that it should erase the prediction history at that point. I'm actually thinking that a pred_hist.clear() might be more appropriate since if you have a fault in the last stage of the pipeline, it should be safe to clear all prediction history from the pipe. In any case, those would be the potential fixes that I see offhand. Can you try them out? -- - Korey
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users