riscv: Add overrides to various StaticInst methods.

This makes riscv compile with the version of clang(++) I have on my
workstation.

Change-Id: I0478616810fbc8a715fd61323b7e0f73676c8328
Reviewed-on: https://gem5-review.googlesource.com/7643
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Gabe Black
2018-01-29 15:17:08 -08:00
parent cca6459b4f
commit 89f2871168
5 changed files with 24 additions and 17 deletions

View File

@@ -75,23 +75,27 @@ class RiscvMacroInst : public RiscvStaticInst
~RiscvMacroInst() { microops.clear(); }
StaticInstPtr fetchMicroop(MicroPC upc) const { return microops[upc]; }
StaticInstPtr
fetchMicroop(MicroPC upc) const override
{
return microops[upc];
}
Fault
initiateAcc(ExecContext *xc, Trace::InstRecord *traceData) const
initiateAcc(ExecContext *xc, Trace::InstRecord *traceData) const override
{
panic("Tried to execute a macroop directly!\n");
}
Fault
completeAcc(PacketPtr pkt, ExecContext *xc,
Trace::InstRecord *traceData) const
Trace::InstRecord *traceData) const override
{
panic("Tried to execute a macroop directly!\n");
}
Fault
execute(ExecContext *xc, Trace::InstRecord *traceData) const
execute(ExecContext *xc, Trace::InstRecord *traceData) const override
{
panic("Tried to execute a macroop directly!\n");
}

View File

@@ -51,10 +51,11 @@ def template AtomicMemOpDeclare {{
// Constructor
%(class_name)sLoad(ExtMachInst machInst, %(class_name)s *_p);
Fault execute(ExecContext *, Trace::InstRecord *) const;
Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
Fault execute(ExecContext *, Trace::InstRecord *) const override;
Fault initiateAcc(ExecContext *,
Trace::InstRecord *) const override;
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const;
Trace::InstRecord *) const override;
};
class %(class_name)sStore : public %(base_class)sMicro
@@ -63,10 +64,11 @@ def template AtomicMemOpDeclare {{
// Constructor
%(class_name)sStore(ExtMachInst machInst, %(class_name)s *_p);
Fault execute(ExecContext *, Trace::InstRecord *) const;
Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
Fault execute(ExecContext *, Trace::InstRecord *) const override;
Fault initiateAcc(ExecContext *,
Trace::InstRecord *) const override;
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const;
Trace::InstRecord *) const override;
};
};
}};

View File

@@ -40,7 +40,7 @@ def template BasicDeclare {{
public:
/// Constructor.
%(class_name)s(MachInst machInst);
Fault execute(ExecContext *, Trace::InstRecord *) const;
Fault execute(ExecContext *, Trace::InstRecord *) const override;
using %(base_class)s::generateDisassembly;
};
}};

View File

@@ -43,9 +43,10 @@ def template LoadStoreDeclare {{
/// Constructor.
%(class_name)s(ExtMachInst machInst);
Fault execute(ExecContext *, Trace::InstRecord *) const;
Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
Fault completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const;
Fault execute(ExecContext *, Trace::InstRecord *) const override;
Fault initiateAcc(ExecContext *, Trace::InstRecord *) const override;
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const override;
};
}};

View File

@@ -43,7 +43,7 @@ def template ImmDeclare {{
public:
/// Constructor.
%(class_name)s(MachInst machInst);
Fault execute(ExecContext *, Trace::InstRecord *) const;
Fault execute(ExecContext *, Trace::InstRecord *) const override;
std::string generateDisassembly(Addr pc,
const SymbolTable *symtab) const override;
};
@@ -99,7 +99,7 @@ def template BranchDeclare {{
public:
/// Constructor.
%(class_name)s(MachInst machInst);
Fault execute(ExecContext *, Trace::InstRecord *) const;
Fault execute(ExecContext *, Trace::InstRecord *) const override;
std::string
generateDisassembly(Addr pc, const SymbolTable *symtab) const override;
@@ -158,7 +158,7 @@ def template JumpDeclare {{
public:
/// Constructor.
%(class_name)s(MachInst machInst);
Fault execute(ExecContext *, Trace::InstRecord *) const;
Fault execute(ExecContext *, Trace::InstRecord *) const override;
std::string
generateDisassembly(Addr pc, const SymbolTable *symtab) const override;