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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user