ARM: Fix issue with predicted next pc being wrong because of advance() ordering.

npc in PCState for ARM was being calculated before the current flags were
updated with the next flags. This causes an issue as the npc is incremented by
two or four depending on the current flags (thumb or not) and was leading to
branches that were predicted correctly being identified as mispredicted.
This commit is contained in:
Ali Saidi
2012-06-29 11:18:28 -04:00
parent c51fc5ceff
commit aed8050824

View File

@@ -332,8 +332,8 @@ namespace ArmISA
advance()
{
Base::advance();
npc(pc() + (thumb() ? 2 : 4));
flags = nextFlags;
npc(pc() + (thumb() ? 2 : 4));
if (_nextItstate) {
_itstate = _nextItstate;