From: Ali Saidi Date: Fri, 29 Jun 2012 15:18:28 +0000 (-0400) Subject: ARM: Fix issue with predicted next pc being wrong because of advance() ordering. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aed8050824793a25afe0e4dab30cbebc7d6b9083;p=gem5.git 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. --- diff --git a/src/arch/arm/types.hh b/src/arch/arm/types.hh index ebebbcc46..cd0b74b2d 100644 --- a/src/arch/arm/types.hh +++ b/src/arch/arm/types.hh @@ -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;