From b48ed9b6c2a8a8aa8eb2182acc77239cc8a3358d Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 23 Oct 2015 09:51:12 -0400 Subject: [PATCH] x86: Add missing explicit overrides for X86 devices Make clang >= 3.5 happy when compiling build/X86/gem5.opt on OSX. --- src/arch/x86/interrupts.hh | 16 ++++++++-------- src/arch/x86/tlb.hh | 8 ++++---- src/dev/x86/cmos.hh | 6 +++--- src/dev/x86/i8042.hh | 10 +++++----- src/dev/x86/i82094aa.hh | 16 ++++++++-------- src/dev/x86/i8237.hh | 4 ++-- src/dev/x86/i8254.hh | 6 +++--- src/dev/x86/i8259.hh | 10 +++++----- src/dev/x86/speaker.hh | 4 ++-- src/mem/multi_level_page_table.hh | 12 ++++++------ 10 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh index b1bdbf10f..26699b01e 100644 --- a/src/arch/x86/interrupts.hh +++ b/src/arch/x86/interrupts.hh @@ -212,15 +212,15 @@ class Interrupts : public BasicPioDevice, IntDevice /* * Initialize this object by registering it with the IO APIC. */ - void init(); + void init() override; /* * Functions to interact with the interrupt port from IntDevice. */ - Tick read(PacketPtr pkt); - Tick write(PacketPtr pkt); - Tick recvMessage(PacketPtr pkt); - Tick recvResponse(PacketPtr pkt); + Tick read(PacketPtr pkt) override; + Tick write(PacketPtr pkt) override; + Tick recvMessage(PacketPtr pkt) override; + Tick recvResponse(PacketPtr pkt) override; bool triggerTimerInterrupt() @@ -231,10 +231,10 @@ class Interrupts : public BasicPioDevice, IntDevice return entry.periodic; } - AddrRangeList getIntAddrRange() const; + AddrRangeList getIntAddrRange() const override; BaseMasterPort &getMasterPort(const std::string &if_name, - PortID idx = InvalidPortID) + PortID idx = InvalidPortID) override { if (if_name == "int_master") { return intMasterPort; @@ -243,7 +243,7 @@ class Interrupts : public BasicPioDevice, IntDevice } BaseSlavePort &getSlavePort(const std::string &if_name, - PortID idx = InvalidPortID) + PortID idx = InvalidPortID) override { if (if_name == "int_slave") { return intSlavePort; diff --git a/src/arch/x86/tlb.hh b/src/arch/x86/tlb.hh index 6e3eb2eee..53f61dcbc 100644 --- a/src/arch/x86/tlb.hh +++ b/src/arch/x86/tlb.hh @@ -74,7 +74,7 @@ namespace X86ISA typedef X86TLBParams Params; TLB(const Params *p); - void takeOverFrom(BaseTLB *otlb) {} + void takeOverFrom(BaseTLB *otlb) override {} TlbEntry *lookup(Addr va, bool update_lru = true); @@ -89,11 +89,11 @@ namespace X86ISA public: Walker *getWalker(); - void flushAll(); + void flushAll() override; void flushNonGlobal(); - void demapPage(Addr va, uint64_t asn); + void demapPage(Addr va, uint64_t asn) override; protected: uint32_t size; @@ -161,7 +161,7 @@ namespace X86ISA * * @return A pointer to the walker master port */ - virtual BaseMasterPort *getMasterPort(); + BaseMasterPort *getMasterPort() override; }; } diff --git a/src/dev/x86/cmos.hh b/src/dev/x86/cmos.hh index 63a6d6a68..1a755be1a 100644 --- a/src/dev/x86/cmos.hh +++ b/src/dev/x86/cmos.hh @@ -78,11 +78,11 @@ class Cmos : public BasicPioDevice address = 0; } - Tick read(PacketPtr pkt); + Tick read(PacketPtr pkt) override; - Tick write(PacketPtr pkt); + Tick write(PacketPtr pkt) override; - virtual void startup(); + void startup() override; void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; diff --git a/src/dev/x86/i8042.hh b/src/dev/x86/i8042.hh index bddbe9b27..82d07e9cf 100644 --- a/src/dev/x86/i8042.hh +++ b/src/dev/x86/i8042.hh @@ -118,7 +118,7 @@ class PS2Mouse : public PS2Device PS2Mouse() : PS2Device(), status(0), resolution(4), sampleRate(100) {} - bool processData(uint8_t data); + bool processData(uint8_t data) override; void serialize(const std::string &base, CheckpointOut &cp) const override; void unserialize(const std::string &base, CheckpointIn &cp) override; @@ -151,7 +151,7 @@ class PS2Keyboard : public PS2Device }; public: - bool processData(uint8_t data); + bool processData(uint8_t data) override; }; class I8042 : public BasicPioDevice @@ -241,11 +241,11 @@ class I8042 : public BasicPioDevice I8042(Params *p); - AddrRangeList getAddrRanges() const; + AddrRangeList getAddrRanges() const override; - Tick read(PacketPtr pkt); + Tick read(PacketPtr pkt) override; - Tick write(PacketPtr pkt); + Tick write(PacketPtr pkt) override; void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; diff --git a/src/dev/x86/i82094aa.hh b/src/dev/x86/i82094aa.hh index 36986d2c4..c9e2f1c81 100644 --- a/src/dev/x86/i82094aa.hh +++ b/src/dev/x86/i82094aa.hh @@ -92,24 +92,24 @@ class I82094AA : public BasicPioDevice, public IntDevice I82094AA(Params *p); - void init(); + void init() override; - Tick read(PacketPtr pkt); - Tick write(PacketPtr pkt); + Tick read(PacketPtr pkt) override; + Tick write(PacketPtr pkt) override; - AddrRangeList getIntAddrRange() const; + AddrRangeList getIntAddrRange() const override; void writeReg(uint8_t offset, uint32_t value); uint32_t readReg(uint8_t offset); BaseMasterPort &getMasterPort(const std::string &if_name, - PortID idx = InvalidPortID); + PortID idx = InvalidPortID) override; Tick recvResponse(PacketPtr pkt) override; - void signalInterrupt(int line); - void raiseInterruptPin(int number); - void lowerInterruptPin(int number); + void signalInterrupt(int line) override; + void raiseInterruptPin(int number) override; + void lowerInterruptPin(int number) override; void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; diff --git a/src/dev/x86/i8237.hh b/src/dev/x86/i8237.hh index 49c1fd924..666095566 100644 --- a/src/dev/x86/i8237.hh +++ b/src/dev/x86/i8237.hh @@ -55,9 +55,9 @@ class I8237 : public BasicPioDevice I8237(Params *p) : BasicPioDevice(p, 16), latency(p->pio_latency), maskReg(0) { } - Tick read(PacketPtr pkt); + Tick read(PacketPtr pkt) override; - Tick write(PacketPtr pkt); + Tick write(PacketPtr pkt) override; void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; diff --git a/src/dev/x86/i8254.hh b/src/dev/x86/i8254.hh index 86d4f0323..8243f8391 100644 --- a/src/dev/x86/i8254.hh +++ b/src/dev/x86/i8254.hh @@ -81,9 +81,9 @@ class I8254 : public BasicPioDevice pit(p->name, this), intPin(p->int_pin) { } - Tick read(PacketPtr pkt); + Tick read(PacketPtr pkt) override; - Tick write(PacketPtr pkt); + Tick write(PacketPtr pkt) override; bool outputHigh(unsigned int num) @@ -112,7 +112,7 @@ class I8254 : public BasicPioDevice void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; - virtual void startup(); + void startup() override; }; diff --git a/src/dev/x86/i8259.hh b/src/dev/x86/i8259.hh index 0b2cee01c..c443f7805 100644 --- a/src/dev/x86/i8259.hh +++ b/src/dev/x86/i8259.hh @@ -89,8 +89,8 @@ class I8259 : public BasicPioDevice, public IntDevice I8259(Params * p); - Tick read(PacketPtr pkt); - Tick write(PacketPtr pkt); + Tick read(PacketPtr pkt) override; + Tick write(PacketPtr pkt) override; void maskAll() @@ -104,9 +104,9 @@ class I8259 : public BasicPioDevice, public IntDevice IMR = 0x00; } - void signalInterrupt(int line); - void raiseInterruptPin(int number); - void lowerInterruptPin(int number); + void signalInterrupt(int line) override; + void raiseInterruptPin(int number) override; + void lowerInterruptPin(int number) override; int getVector(); void serialize(CheckpointOut &cp) const override; diff --git a/src/dev/x86/speaker.hh b/src/dev/x86/speaker.hh index 9f1656370..692d38816 100644 --- a/src/dev/x86/speaker.hh +++ b/src/dev/x86/speaker.hh @@ -69,9 +69,9 @@ class Speaker : public BasicPioDevice { } - Tick read(PacketPtr pkt); + Tick read(PacketPtr pkt) override; - Tick write(PacketPtr pkt); + Tick write(PacketPtr pkt) override; void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; diff --git a/src/mem/multi_level_page_table.hh b/src/mem/multi_level_page_table.hh index b9e020460..a1d3fbc39 100644 --- a/src/mem/multi_level_page_table.hh +++ b/src/mem/multi_level_page_table.hh @@ -145,14 +145,14 @@ public: System *_sys); ~MultiLevelPageTable(); - void initState(ThreadContext* tc); + void initState(ThreadContext* tc) override; void map(Addr vaddr, Addr paddr, int64_t size, - uint64_t flags = 0); - void remap(Addr vaddr, int64_t size, Addr new_vaddr); - void unmap(Addr vaddr, int64_t size); - bool isUnmapped(Addr vaddr, int64_t size); - bool lookup(Addr vaddr, TheISA::TlbEntry &entry); + uint64_t flags = 0) override; + void remap(Addr vaddr, int64_t size, Addr new_vaddr) override; + void unmap(Addr vaddr, int64_t size) override; + bool isUnmapped(Addr vaddr, int64_t size) override; + bool lookup(Addr vaddr, TheISA::TlbEntry &entry) override; void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; }; -- 2.30.2