From: Gabe Black Date: Mon, 14 Feb 2011 01:45:47 +0000 (-0800) Subject: X86: Detect branches taking into account instruction size. X-Git-Tag: stable_2012_02_02~553^2~2^2^2~5 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77b4a370670bed84d1c000a58d3e668334fdc86b;p=gem5.git X86: Detect branches taking into account instruction size. The size of the current instruction determines what the npc should be if there's no branching. --- diff --git a/src/arch/x86/types.hh b/src/arch/x86/types.hh index d78af1b81..4641141d3 100644 --- a/src/arch/x86/types.hh +++ b/src/arch/x86/types.hh @@ -243,6 +243,12 @@ namespace X86ISA uint8_t size() const { return _size; } void size(uint8_t newSize) { _size = newSize; } + bool + branching() const + { + return this->npc() != this->pc() + size(); + } + void advance() {