projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44306e8
)
X86: Detect branches taking into account instruction size.
author
Gabe Black
<gblack@eecs.umich.edu>
Mon, 14 Feb 2011 01:45:47 +0000
(17:45 -0800)
committer
Gabe Black
<gblack@eecs.umich.edu>
Mon, 14 Feb 2011 01:45:47 +0000
(17:45 -0800)
The size of the current instruction determines what the npc should be if
there's no branching.
src/arch/x86/types.hh
patch
|
blob
|
history
diff --git
a/src/arch/x86/types.hh
b/src/arch/x86/types.hh
index d78af1b8150d25e8b2d7835d5851e89614cc1210..4641141d356dec6d52409ae7c58194f44788db3d 100644
(file)
--- 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()
{