arch: Make the ISA::clear() method virtual.
This method is not at all on the critical path, and the adding virtual method overhead to it will have essentially no effect on over all performance. Change-Id: I583bbe30f5ed923a0c771f36c3f07e5979c28476 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51236 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -164,7 +164,7 @@ namespace ArmISA
|
||||
const RegId &mapIntRegId(RegIndex idx) const { return intRegMap[idx]; }
|
||||
|
||||
public:
|
||||
void clear();
|
||||
void clear() override;
|
||||
|
||||
protected:
|
||||
void clear32(const ArmISAParams &p, const SCTLR &sctlr_rst);
|
||||
|
||||
@@ -68,6 +68,8 @@ class BaseISA : public SimObject
|
||||
|
||||
public:
|
||||
virtual PCStateBase *newPCState(Addr new_inst_addr=0) const = 0;
|
||||
virtual void clear() {}
|
||||
|
||||
virtual void takeOverFrom(ThreadContext *new_tc, ThreadContext *old_tc) {}
|
||||
virtual void setThreadContext(ThreadContext *_tc) { tc = _tc; }
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace MipsISA
|
||||
std::vector<BankType> bankType;
|
||||
|
||||
public:
|
||||
void clear();
|
||||
void clear() override;
|
||||
|
||||
PCStateBase *
|
||||
newPCState(Addr new_inst_addr=0) const override
|
||||
|
||||
@@ -57,15 +57,12 @@ class ISA : public BaseISA
|
||||
RegVal miscRegs[NUM_MISCREGS];
|
||||
|
||||
public:
|
||||
void clear() {}
|
||||
|
||||
PCStateBase *
|
||||
newPCState(Addr new_inst_addr=0) const override
|
||||
{
|
||||
return new PCState(new_inst_addr);
|
||||
}
|
||||
|
||||
public:
|
||||
RegVal
|
||||
readMiscRegNoEffect(int misc_reg) const
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ class ISA : public BaseISA
|
||||
public:
|
||||
using Params = RiscvISAParams;
|
||||
|
||||
void clear();
|
||||
void clear() override;
|
||||
|
||||
PCStateBase *
|
||||
newPCState(Addr new_inst_addr=0) const override
|
||||
|
||||
@@ -170,7 +170,7 @@ class ISA : public BaseISA
|
||||
public:
|
||||
const RegIndex &mapIntRegId(RegIndex idx) const { return intRegMap[idx]; }
|
||||
|
||||
void clear();
|
||||
void clear() override;
|
||||
|
||||
PCStateBase *
|
||||
newPCState(Addr new_inst_addr=0) const override
|
||||
|
||||
@@ -60,7 +60,7 @@ class ISA : public BaseISA
|
||||
std::string vendorString;
|
||||
|
||||
public:
|
||||
void clear();
|
||||
void clear() override;
|
||||
|
||||
PCStateBase *
|
||||
newPCState(Addr new_inst_addr=0) const override
|
||||
|
||||
Reference in New Issue
Block a user