diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2012-06-29 11:18:28 -0400 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2012-06-29 11:18:28 -0400 |
commit | aed8050824793a25afe0e4dab30cbebc7d6b9083 (patch) | |
tree | a756132de24938dcf135c686b233d6c04af87426 | |
parent | c51fc5ceffd19c62c2895fb3444a532e9fe0f3ca (diff) | |
download | gem5-aed8050824793a25afe0e4dab30cbebc7d6b9083.tar.xz |
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.
-rw-r--r-- | src/arch/arm/types.hh | 2 |
1 files changed, 1 insertions, 1 deletions
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; |