Hi all,
I'am currently looking at the branch prediction code.
In the predict function (src/cpu/o3/bpred_unit_impl.hh: 160), if the BTB
entry is not valid for a taken prediction, the prediction pred_taken is
changed to false and the history is changed. Moreover, the RAS is popped
if it is a call (l.254). But the RAS is popped only if the call is
conditional (I don't know exactly why).
If it is an unconditional call, the RAS is not popped.
And if this unconditional call need to be squashed (by the squash
function l.298), the RAS needs to be popped. For this instruction, the
validBTB flag is not set, so the line 316 of the squash function is not
executed ans thus, the entry is not popped.
From my current understanding of the code, this seems to be a bug. As I
don't know the whole code, this case can be taken care of in some other
function or it is not a problem.
Any idea on the subject ?
Nathanaël Prémillieu
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users