arch: Add a bunch of missing override specifiers.
Missing override on methods which are overriding virtual methods causes warnings/errors on certain compilers. Change-Id: I16f565fa07bfcb399a0209cd87f1f9729cd89b2e Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25223 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -81,7 +81,7 @@ class Statistics : public ::Kernel::Statistics
|
||||
public:
|
||||
Statistics();
|
||||
|
||||
void regStats(const std::string &name);
|
||||
void regStats(const std::string &name) override;
|
||||
|
||||
public:
|
||||
void mode(cpu_mode newmode, ThreadContext *tc);
|
||||
|
||||
@@ -46,7 +46,7 @@ class AlphaLinuxProcess : public AlphaProcess
|
||||
|
||||
void syscall(ThreadContext *tc, Fault *fault) override;
|
||||
|
||||
virtual SyscallDesc* getDesc(int callnum);
|
||||
SyscallDesc *getDesc(int callnum) override;
|
||||
|
||||
/// Array of syscall descriptors, indexed by call number.
|
||||
static SyscallDescABI<DefaultSyscallABI> syscallDescs[];
|
||||
|
||||
@@ -61,9 +61,7 @@ class Interrupts : public BaseInterrupts
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
setCPU(BaseCPU *_cpu)
|
||||
{}
|
||||
void setCPU(BaseCPU *_cpu) override {}
|
||||
|
||||
// post(int int_num, int index) is responsible
|
||||
// for posting an interrupt. It sets a bit
|
||||
@@ -72,7 +70,7 @@ class Interrupts : public BaseInterrupts
|
||||
// which is called by checkInterrupts
|
||||
//
|
||||
void post(int int_num, ThreadContext *tc);
|
||||
void post(int int_num, int index);
|
||||
void post(int int_num, int index) override;
|
||||
|
||||
// clear(int int_num, int index) is responsible
|
||||
// for clearing an interrupt. It clear a bit
|
||||
@@ -81,7 +79,7 @@ class Interrupts : public BaseInterrupts
|
||||
// which is called by checkInterrupts
|
||||
//
|
||||
void clear(int int_num, ThreadContext* tc);
|
||||
void clear(int int_num, int index);
|
||||
void clear(int int_num, int index) override;
|
||||
|
||||
// clearAll() is responsible
|
||||
// for clearing all interrupts. It clears all bits
|
||||
@@ -90,7 +88,7 @@ class Interrupts : public BaseInterrupts
|
||||
// which is called by checkInterrupts
|
||||
//
|
||||
void clearAll(ThreadContext *tc);
|
||||
void clearAll();
|
||||
void clearAll() override;
|
||||
|
||||
// getInterrupt(ThreadContext * tc) checks if an interrupt
|
||||
// should be returned. It ands the interrupt mask and
|
||||
@@ -98,16 +96,16 @@ class Interrupts : public BaseInterrupts
|
||||
// also makes sure interrupts are enabled (IE) and
|
||||
// that ERL and ERX are not set
|
||||
//
|
||||
Fault getInterrupt(ThreadContext *tc);
|
||||
Fault getInterrupt(ThreadContext *tc) override;
|
||||
|
||||
// updateIntrInfo(ThreadContext *tc) const syncs the
|
||||
// MIPS cause register with the instatus variable. instatus
|
||||
// is essentially a copy of the MIPS cause[IP7:IP0]
|
||||
//
|
||||
void updateIntrInfo(ThreadContext *tc);
|
||||
void updateIntrInfo(ThreadContext *tc) override;
|
||||
bool interruptsPending(ThreadContext *tc) const;
|
||||
bool onCpuTimerInterrupt(ThreadContext *tc) const;
|
||||
bool checkInterrupts(ThreadContext *tc) const;
|
||||
bool checkInterrupts(ThreadContext *tc) const override;
|
||||
|
||||
void
|
||||
serialize(CheckpointOut &cp) const override
|
||||
|
||||
@@ -44,7 +44,7 @@ class MipsLinuxProcess : public MipsProcess
|
||||
/// Constructor.
|
||||
MipsLinuxProcess(ProcessParams * params, ObjectFile *objFile);
|
||||
|
||||
virtual SyscallDesc* getDesc(int callnum);
|
||||
SyscallDesc* getDesc(int callnum) override;
|
||||
|
||||
/// The target system's hostname.
|
||||
static const char *hostname;
|
||||
|
||||
@@ -43,13 +43,13 @@ class PowerLinuxProcess : public PowerProcess
|
||||
public:
|
||||
PowerLinuxProcess(ProcessParams * params, ObjectFile *objFile);
|
||||
|
||||
virtual SyscallDesc* getDesc(int callnum);
|
||||
SyscallDesc *getDesc(int callnum) override;
|
||||
|
||||
void initState();
|
||||
void initState() override;
|
||||
|
||||
void syscall(ThreadContext *tc, Fault *fault) override;
|
||||
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i);
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
|
||||
|
||||
@@ -46,14 +46,15 @@ class PowerProcess : public Process
|
||||
protected:
|
||||
PowerProcess(ProcessParams * params, ObjectFile *objFile);
|
||||
|
||||
void initState();
|
||||
void initState() override;
|
||||
|
||||
public:
|
||||
void argsInit(int intSize, int pageSize);
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i);
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
|
||||
void setSyscallReturn(ThreadContext *tc,
|
||||
SyscallReturn return_value) override;
|
||||
};
|
||||
|
||||
#endif // __POWER_PROCESS_HH__
|
||||
|
||||
@@ -48,7 +48,7 @@ class RiscvLinuxProcess64 : public RiscvProcess64
|
||||
/// Constructor.
|
||||
RiscvLinuxProcess64(ProcessParams * params, ObjectFile *objFile);
|
||||
|
||||
virtual SyscallDesc* getDesc(int callnum);
|
||||
SyscallDesc* getDesc(int callnum) override;
|
||||
|
||||
/// The target system's hostname.
|
||||
static const char *hostname;
|
||||
@@ -68,7 +68,7 @@ class RiscvLinuxProcess32 : public RiscvProcess32
|
||||
/// Constructor.
|
||||
RiscvLinuxProcess32(ProcessParams * params, ObjectFile *objFile);
|
||||
|
||||
virtual SyscallDesc* getDesc(int callnum);
|
||||
SyscallDesc* getDesc(int callnum) override;
|
||||
|
||||
/// The target system's hostname.
|
||||
static const char *hostname;
|
||||
|
||||
@@ -53,7 +53,7 @@ class RemoteGDB : public BaseRemoteGDB
|
||||
static const int NumGDBRegs = 4162;
|
||||
static const int NumCSRs = 4096;
|
||||
|
||||
bool acc(Addr addr, size_t len);
|
||||
bool acc(Addr addr, size_t len) override;
|
||||
// A breakpoint will be 2 bytes if it is compressed and 4 if not
|
||||
bool checkBpLen(size_t len) override { return len == 2 || len == 4; }
|
||||
|
||||
@@ -82,7 +82,7 @@ class RemoteGDB : public BaseRemoteGDB
|
||||
|
||||
public:
|
||||
RemoteGDB(System *_system, ThreadContext *tc, int _port);
|
||||
BaseGdbRegCache *gdbRegs();
|
||||
BaseGdbRegCache *gdbRegs() override;
|
||||
};
|
||||
|
||||
} // namespace RiscvISA
|
||||
|
||||
@@ -67,7 +67,7 @@ class Interrupts : public BaseInterrupts
|
||||
public:
|
||||
|
||||
void
|
||||
setCPU(BaseCPU * _cpu)
|
||||
setCPU(BaseCPU * _cpu) override
|
||||
{
|
||||
cpu = _cpu;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ class Interrupts : public BaseInterrupts
|
||||
}
|
||||
|
||||
void
|
||||
post(int int_num, int index)
|
||||
post(int int_num, int index) override
|
||||
{
|
||||
DPRINTF(Interrupt, "Interrupt %d:%d posted\n", int_num, index);
|
||||
assert(int_num >= 0 && int_num < NumInterruptTypes);
|
||||
@@ -111,7 +111,7 @@ class Interrupts : public BaseInterrupts
|
||||
}
|
||||
|
||||
void
|
||||
clear(int int_num, int index)
|
||||
clear(int int_num, int index) override
|
||||
{
|
||||
DPRINTF(Interrupt, "Interrupt %d:%d cleared\n", int_num, index);
|
||||
assert(int_num >= 0 && int_num < NumInterruptTypes);
|
||||
@@ -123,7 +123,7 @@ class Interrupts : public BaseInterrupts
|
||||
}
|
||||
|
||||
void
|
||||
clearAll()
|
||||
clearAll() override
|
||||
{
|
||||
for (int i = 0; i < NumInterruptTypes; ++i) {
|
||||
interrupts[i] = 0;
|
||||
@@ -132,7 +132,7 @@ class Interrupts : public BaseInterrupts
|
||||
}
|
||||
|
||||
bool
|
||||
checkInterrupts(ThreadContext *tc) const
|
||||
checkInterrupts(ThreadContext *tc) const override
|
||||
{
|
||||
if (!intStatus)
|
||||
return false;
|
||||
@@ -190,7 +190,7 @@ class Interrupts : public BaseInterrupts
|
||||
}
|
||||
|
||||
Fault
|
||||
getInterrupt(ThreadContext *tc)
|
||||
getInterrupt(ThreadContext *tc) override
|
||||
{
|
||||
assert(checkInterrupts(tc));
|
||||
|
||||
@@ -246,9 +246,7 @@ class Interrupts : public BaseInterrupts
|
||||
return NoFault;
|
||||
}
|
||||
|
||||
void
|
||||
updateIntrInfo(ThreadContext *tc)
|
||||
{}
|
||||
void updateIntrInfo(ThreadContext *tc) override {}
|
||||
|
||||
uint64_t
|
||||
get_vec(int int_num)
|
||||
|
||||
@@ -51,8 +51,8 @@ class SparcLinuxProcess
|
||||
/// indexed by call number.
|
||||
static SyscallDescABI<DefaultSyscallABI> syscall32Descs[];
|
||||
|
||||
SyscallDesc* getDesc(int callnum);
|
||||
SyscallDesc* getDesc32(int callnum);
|
||||
SyscallDesc *getDesc(int callnum);
|
||||
SyscallDesc *getDesc32(int callnum);
|
||||
|
||||
static const int Num_Syscall_Descs;
|
||||
static const int Num_Syscall32_Descs;
|
||||
@@ -66,14 +66,14 @@ class Sparc32LinuxProcess : public SparcLinuxProcess, public Sparc32Process
|
||||
Sparc32LinuxProcess(ProcessParams * params, ObjectFile *objFile);
|
||||
|
||||
SyscallDesc*
|
||||
getDesc(int callnum)
|
||||
getDesc(int callnum) override
|
||||
{
|
||||
return SparcLinuxProcess::getDesc32(callnum);
|
||||
}
|
||||
|
||||
void syscall(ThreadContext *tc, Fault *fault) override;
|
||||
|
||||
void handleTrap(int trapNum, ThreadContext *tc, Fault *fault);
|
||||
void handleTrap(int trapNum, ThreadContext *tc, Fault *fault) override;
|
||||
};
|
||||
|
||||
/// A process with emulated 32 bit SPARC/Linux syscalls.
|
||||
@@ -84,14 +84,14 @@ class Sparc64LinuxProcess : public SparcLinuxProcess, public Sparc64Process
|
||||
Sparc64LinuxProcess(ProcessParams * params, ObjectFile *objFile);
|
||||
|
||||
SyscallDesc*
|
||||
getDesc(int callnum)
|
||||
getDesc(int callnum) override
|
||||
{
|
||||
return SparcLinuxProcess::getDesc(callnum);
|
||||
}
|
||||
|
||||
void syscall(ThreadContext *tc, Fault *fault) override;
|
||||
|
||||
void handleTrap(int trapNum, ThreadContext *tc, Fault *fault);
|
||||
void handleTrap(int trapNum, ThreadContext *tc, Fault *fault) override;
|
||||
};
|
||||
|
||||
SyscallReturn getresuidFunc(SyscallDesc *desc, int num, ThreadContext *tc);
|
||||
|
||||
@@ -54,7 +54,7 @@ class SparcProcess : public Process
|
||||
SparcProcess(ProcessParams * params, ObjectFile *objFile,
|
||||
Addr _StackBias);
|
||||
|
||||
void initState();
|
||||
void initState() override;
|
||||
|
||||
template<class IntType>
|
||||
void argsInit(int pageSize);
|
||||
@@ -68,7 +68,8 @@ class SparcProcess : public Process
|
||||
Addr readSpillStart() { return spillStart; }
|
||||
|
||||
virtual void flushWindows(ThreadContext *tc) = 0;
|
||||
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
|
||||
void setSyscallReturn(ThreadContext *tc,
|
||||
SyscallReturn return_value) override;
|
||||
};
|
||||
|
||||
class Sparc32Process : public SparcProcess
|
||||
@@ -100,15 +101,15 @@ class Sparc32Process : public SparcProcess
|
||||
mmap_end);
|
||||
}
|
||||
|
||||
void initState();
|
||||
void initState() override;
|
||||
|
||||
public:
|
||||
|
||||
void argsInit(int intSize, int pageSize);
|
||||
|
||||
void flushWindows(ThreadContext *tc);
|
||||
void flushWindows(ThreadContext *tc) override;
|
||||
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i);
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
};
|
||||
@@ -141,15 +142,15 @@ class Sparc64Process : public SparcProcess
|
||||
mmap_end);
|
||||
}
|
||||
|
||||
void initState();
|
||||
void initState() override;
|
||||
|
||||
public:
|
||||
|
||||
void argsInit(int intSize, int pageSize);
|
||||
|
||||
void flushWindows(ThreadContext *tc);
|
||||
void flushWindows(ThreadContext *tc) override;
|
||||
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i);
|
||||
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
|
||||
/// Explicitly import the otherwise hidden getSyscallArg
|
||||
using Process::getSyscallArg;
|
||||
};
|
||||
|
||||
@@ -45,7 +45,7 @@ class SparcSolarisProcess : public Sparc64Process
|
||||
/// Constructor.
|
||||
SparcSolarisProcess(ProcessParams * params, ObjectFile *objFile);
|
||||
|
||||
virtual SyscallDesc* getDesc(int callnum);
|
||||
SyscallDesc *getDesc(int callnum) override;
|
||||
|
||||
/// The target system's hostname.
|
||||
static const char *hostname;
|
||||
|
||||
@@ -56,7 +56,7 @@ class X86_64LinuxProcess : public X86_64Process
|
||||
X86_64LinuxProcess(ProcessParams * params, ObjectFile *objFile);
|
||||
void syscall(ThreadContext *tc, Fault *fault) override;
|
||||
void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *process,
|
||||
RegVal flags);
|
||||
RegVal flags) override;
|
||||
};
|
||||
|
||||
class I386LinuxProcess : public I386Process
|
||||
@@ -66,7 +66,7 @@ class I386LinuxProcess : public I386Process
|
||||
I386LinuxProcess(ProcessParams * params, ObjectFile *objFile);
|
||||
void syscall(ThreadContext *tc, Fault *fault) override;
|
||||
void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *process,
|
||||
RegVal flags);
|
||||
RegVal flags) override;
|
||||
};
|
||||
|
||||
} // namespace X86ISA
|
||||
|
||||
Reference in New Issue
Block a user