diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2011-02-13 17:45:47 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2011-02-13 17:45:47 -0800 |
commit | 77b4a370670bed84d1c000a58d3e668334fdc86b (patch) | |
tree | e9cfba7a9c86f34b472664a425478d17ec8ad4fb /src/arch | |
parent | 44306e8114236fb943cdf5462b3ae076b672e8eb (diff) | |
download | gem5-77b4a370670bed84d1c000a58d3e668334fdc86b.tar.xz |
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.
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/types.hh | 6 |
1 files changed, 6 insertions, 0 deletions
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() { |