riscv: Add overrides to various StaticInst methods.
authorGabe Black <gabeblack@google.com>
Mon, 29 Jan 2018 23:17:08 +0000 (15:17 -0800)
committerGabe Black <gabeblack@google.com>
Mon, 29 Jan 2018 23:49:36 +0000 (23:49 +0000)
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>

src/arch/riscv/insts/static_inst.hh
src/arch/riscv/isa/formats/amo.isa
src/arch/riscv/isa/formats/basic.isa
src/arch/riscv/isa/formats/mem.isa
src/arch/riscv/isa/formats/standard.isa

index bf34c9baeace0bea08769aecc58d4ae82de32d11..073b60c1c02f0bbf1be52d712b057fde0621257a 100644 (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");
     }
index e3be23749289dda69bdb0152ceefeb4a42f92bdd..1dca5719101359aaa4bfa41fb6ccf199d2a5ea6f 100644 (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;
         };
     };
 }};
index bb8401e3d5d6df19f3f8f89cf727e44459bd3999..dd25ba6f706f4c29b5c294c125d5462f6ba48633 100644 (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;
     };
 }};
index d4c17541a4bb623d43c6e59e088e29819c053a87..a932d01cc684df948d84a80091582767e6b4a80a 100644 (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;
     };
 }};
 
index ebe157160bb25e7159f67751b6cf29e456081f16..2e0e3edd4948a6c10c6befc38c5ba940b6a205d4 100644 (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;