Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/52053 )

Change subject: cpu,arch: Eliminate the ThreadContext::nextInstAddr method.
......................................................................

cpu,arch: Eliminate the ThreadContext::nextInstAddr method.

This is no longer used.

Change-Id: I0ec170fb3b450430bbeff0a3c37bcdafe70c92b0
---
M src/cpu/simple_thread.hh
M src/cpu/checker/cpu.hh
M src/cpu/o3/thread_context.hh
M src/cpu/o3/dyn_inst.hh
M src/cpu/thread_context.hh
M src/arch/generic/pcstate.hh
M src/cpu/o3/cpu.cc
M src/cpu/o3/cpu.hh
M src/cpu/o3/commit.hh
M src/cpu/checker/thread_context.hh
M src/arch/arm/fastmodel/iris/thread_context.cc
M src/arch/arm/fastmodel/iris/thread_context.hh
12 files changed, 11 insertions(+), 62 deletions(-)



diff --git a/src/arch/arm/fastmodel/iris/thread_context.cc b/src/arch/arm/fastmodel/iris/thread_context.cc
index 11e4f17..a6b8c2a 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.cc
+++ b/src/arch/arm/fastmodel/iris/thread_context.cc
@@ -597,12 +597,6 @@
     return pcState().instAddr();
 }

-Addr
-ThreadContext::nextInstAddr() const
-{
-    return pcState().nextInstAddr();
-}
-
 RegVal
 ThreadContext::readMiscRegNoEffect(RegIndex misc_reg) const
 {
diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh b/src/arch/arm/fastmodel/iris/thread_context.hh
index 8be9281..c5e4cc3 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -351,7 +351,6 @@
     ArmISA::PCState pcState() const override;
     void pcState(const ArmISA::PCState &val) override;
     Addr instAddr() const override;
-    Addr nextInstAddr() const override;

     RegVal readMiscRegNoEffect(RegIndex misc_reg) const override;
     RegVal
diff --git a/src/arch/generic/pcstate.hh b/src/arch/generic/pcstate.hh
index dd61377..e427f38 100644
--- a/src/arch/generic/pcstate.hh
+++ b/src/arch/generic/pcstate.hh
@@ -263,17 +263,6 @@
     MicroPC nupc() const { return _nupc; }
     void nupc(MicroPC val) { _nupc = val; }

-    /**
- * Returns the memory address the bytes of the next instruction came from.
-     *
-     * @return Memory address of the next instruction's encoding.
-     */
-    Addr
-    nextInstAddr() const
-    {
-        return _npc;
-    }
-
     // Reset the macroop's upc without advancing the regular pc.
     void
     uReset()
diff --git a/src/cpu/checker/cpu.hh b/src/cpu/checker/cpu.hh
index a83fe08..7043216 100644
--- a/src/cpu/checker/cpu.hh
+++ b/src/cpu/checker/cpu.hh
@@ -363,7 +363,6 @@
         thread->pcState(val);
     }
     Addr instAddr() { return thread->instAddr(); }
-    Addr nextInstAddr() { return thread->nextInstAddr(); }
     MicroPC microPC() { return thread->microPC(); }
     //////////////////////////////////////////

diff --git a/src/cpu/checker/thread_context.hh b/src/cpu/checker/thread_context.hh
index 8618712..62abb21 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -351,9 +351,6 @@
     Addr instAddr() const override { return actualTC->instAddr(); }

     /** Reads this thread's next PC. */
-    Addr nextInstAddr() const override { return actualTC->nextInstAddr(); }
-
-    /** Reads this thread's next PC. */
     MicroPC microPC() const override { return actualTC->microPC(); }

     RegVal
diff --git a/src/cpu/o3/commit.hh b/src/cpu/o3/commit.hh
index 8a005e2..ed462e0 100644
--- a/src/cpu/o3/commit.hh
+++ b/src/cpu/o3/commit.hh
@@ -314,13 +314,6 @@
     /** Returns the PC of a specific thread. */
     Addr instAddr(ThreadID tid) { return pc[tid]->instAddr(); }

-    /** Returns the next PC of a specific thread. */
-    Addr
-    nextInstAddr(ThreadID tid)
-    {
-        return pc[tid]->as<TheISA::PCState>().nextInstAddr();
-    }
-
     /** Reads the micro PC of a specific thread. */
     Addr microPC(ThreadID tid) { return pc[tid]->microPC(); }

diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 4d6e584..d56ecb5 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -1387,12 +1387,6 @@
     return commit.instAddr(tid);
 }

-Addr
-CPU::nextInstAddr(ThreadID tid)
-{
-    return commit.nextInstAddr(tid);
-}
-
 MicroPC
 CPU::microPC(ThreadID tid)
 {
diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh
index d7d660a..9cb129c 100644
--- a/src/cpu/o3/cpu.hh
+++ b/src/cpu/o3/cpu.hh
@@ -420,9 +420,6 @@
     /** Reads the commit micro PC of a specific thread. */
     MicroPC microPC(ThreadID tid);

-    /** Reads the next PC of a specific thread. */
-    Addr nextInstAddr(ThreadID tid);
-
     /** Initiates a squash of all in-flight instructions for a given
      * thread.  The source of the squash is an external update of
      * state through the TC.
diff --git a/src/cpu/o3/dyn_inst.hh b/src/cpu/o3/dyn_inst.hh
index 2ab3311..690ff20 100644
--- a/src/cpu/o3/dyn_inst.hh
+++ b/src/cpu/o3/dyn_inst.hh
@@ -562,13 +562,6 @@
     /** Returns the predicted PC immediately after the branch. */
     Addr predInstAddr() { return predPC->instAddr(); }

-    /** Returns the predicted PC two instructions after the branch */
-    Addr
-    predNextInstAddr()
-    {
-        return predPC->as<TheISA::PCState>().nextInstAddr();
-    }
-
     /** Returns the predicted micro PC after the branch */
     Addr predMicroPC() { return predPC->microPC(); }

@@ -961,13 +954,6 @@
     /** Read the PC of this instruction. */
     Addr instAddr() const { return pc->instAddr(); }

-    /** Read the PC of the next instruction. */
-    Addr
-    nextInstAddr() const
-    {
-        return pc->as<TheISA::PCState>().nextInstAddr();
-    }
-
     /**Read the micro PC of this instruction. */
     Addr microPC() const { return pc->microPC(); }

diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index d61c07f..9c38680 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -296,13 +296,6 @@
     }

     /** Reads this thread's next PC. */
-    Addr
-    nextInstAddr() const override
-    {
-        return cpu->nextInstAddr(thread->threadId());
-    }
-
-    /** Reads this thread's next PC. */
     MicroPC
     microPC() const override
     {
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index ce918be..770e3ab 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -428,7 +428,6 @@
     }

     Addr instAddr() const override  { return _pcState.instAddr(); }
-    Addr nextInstAddr() const override { return _pcState.nextInstAddr(); }
     MicroPC microPC() const override { return _pcState.microPC(); }
     bool readPredicate() const { return predicate; }
     void setPredicate(bool val) { predicate = val; }
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index fee2503..1f04e3c 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -240,8 +240,6 @@

     virtual Addr instAddr() const = 0;

-    virtual Addr nextInstAddr() const = 0;
-
     virtual MicroPC microPC() const = 0;

     virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const = 0;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52053
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I0ec170fb3b450430bbeff0a3c37bcdafe70c92b0
Gerrit-Change-Number: 52053
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to