From aed8050824793a25afe0e4dab30cbebc7d6b9083 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 29 Jun 2012 11:18:28 -0400 Subject: 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. --- src/arch/arm/types.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch/arm') 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; -- cgit v1.2.3