Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/51531 )
Change subject: cpu: Eliminate the unused hasBranchTarget method in
StaticInst.
......................................................................
cpu: Eliminate the unused hasBranchTarget method in StaticInst.
This was once used to implement GDB single stepping back when it was
reimplemented for each ISA, but has not been used since 2014 when that
code was refactored.
Change-Id: If37ccfec2c43a33320d753c68892aa6fefd16b4f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51531
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: ZHENGRONG WANG <[email protected]>
---
M src/cpu/static_inst.cc
M src/cpu/static_inst.hh
2 files changed, 18 insertions(+), 24 deletions(-)
Approvals:
Daniel Carvalho: Looks good to me, but someone else must approve
ZHENGRONG WANG: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/cpu/static_inst.cc b/src/cpu/static_inst.cc
index 903e3d7..1580759 100644
--- a/src/cpu/static_inst.cc
+++ b/src/cpu/static_inst.cc
@@ -33,23 +33,6 @@
namespace gem5
{
-bool
-StaticInst::hasBranchTarget(const TheISA::PCState &pc, ThreadContext *tc,
- TheISA::PCState &tgt) const
-{
- if (isDirectCtrl()) {
- tgt = branchTarget(pc);
- return true;
- }
-
- if (isIndirectCtrl()) {
- tgt = branchTarget(tc);
- return true;
- }
-
- return false;
-}
-
StaticInstPtr
StaticInst::fetchMicroop(MicroPC upc) const
{
diff --git a/src/cpu/static_inst.hh b/src/cpu/static_inst.hh
index f63baf2..2039644 100644
--- a/src/cpu/static_inst.hh
+++ b/src/cpu/static_inst.hh
@@ -352,13 +352,6 @@
virtual TheISA::PCState branchTarget(ThreadContext *tc) const;
/**
- * Return true if the instruction is a control transfer, and if so,
- * return the target address as well.
- */
- bool hasBranchTarget(const TheISA::PCState &pc, ThreadContext *tc,
- TheISA::PCState &tgt) const;
-
- /**
* Return string representation of disassembled instruction.
* The default version of this function will call the internal
* virtual generateDisassembly() function to get the string,
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51531
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: If37ccfec2c43a33320d753c68892aa6fefd16b4f
Gerrit-Change-Number: 51531
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: ZHENGRONG WANG <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s