On Fri, Apr 16, 2010 at 1:51 PM, Maximilien Breughe <
[email protected]> wrote:

> Yes, you are right, it's indeed not a general solution..
> We might be able to solve it by adding an extra variable to
> inorder_dyninst. Just a flag that let us check if the branch is allready
> resolved.
> What do you think?
>
A "isPredicted" flag does seem like it will be necessary.

So on a branch squash, we need to check:
1.  If the instruction is a branch (isControl()) and if has been resolved
(isPredicted?) -> update prediction
2.  If the instruction is a branch (isControl()) and if has been
predicted(isExecuted()?) -> update prediction/target
3.  If the squash is coming from a non-branch instruction (due to fault or
context switch), then -> update/clear(?) prediction

And to that, hopefully the squashing function has an argument for the
DynInstPtr object or we will have to give it one.

I think that covers all the cases. Agree/disagree?


>
> By the way, I also made a blunder in my patch. Because I saw such a good
> improvement of the branch predicter I didn't see this one (at squash in
> cpu/inorder/resources/branch_predictor.cc):
> bool taken = inst->predTaken();
>
> should be
>
> bool taken = !(corr_targ == (inst->readPC() + sizeof(TheISA::MachInst)));
>
> I though the predictTaken-flag of InOrderDynInst gets updated but it
> doesn't =).
> If you want I will do another mailpatch or try to bundle it in one patch.
>
Hmmmm.... yea, sure, once we figure out the right step, an updated patch
would be nice .... :)

-- 
- Korey
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to