cpu,arch: Eliminate the ThreadContext::nextInstAddr method.
This is no longer used.
Change-Id: I0ec170fb3b450430bbeff0a3c37bcdafe70c92b0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52053
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
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 a1348a5..10f6618 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 05d3a51..69c6ed8 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -1325,12 +1325,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 a2002c0..edb694e 100644
--- a/src/cpu/o3/cpu.hh
+++ b/src/cpu/o3/cpu.hh
@@ -396,9 +396,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 c7e99a4..4b4e926 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 5704891..258d376 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -430,7 +430,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;