changeset 1e9c54ee5fd0 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=1e9c54ee5fd0
description:
        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:

 src/arch/x86/types.hh |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 3e00a91c33b4 -r 1e9c54ee5fd0 src/arch/x86/types.hh
--- a/src/arch/x86/types.hh     Sun Feb 13 17:45:30 2011 -0800
+++ b/src/arch/x86/types.hh     Sun Feb 13 17:45:47 2011 -0800
@@ -243,6 +243,12 @@
         uint8_t size() const { return _size; }
         void size(uint8_t newSize) { _size = newSize; }
 
+        bool
+        branching() const
+        {
+            return this->npc() != this->pc() + size();
+        }
+
         void
         advance()
         {
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to