[MCA] Fix for uninitialised member in constructor. NFC

This commit is contained in:
Andrea Di Biagio 2021-03-24 11:20:15 +00:00
parent c1ef642ad8
commit 97a00b7b20
2 changed files with 5 additions and 2 deletions

View File

@ -45,7 +45,9 @@ class WriteRef {
static const unsigned INVALID_IID;
public:
WriteRef() : IID(INVALID_IID), WriteBackCycle(), WriteResID(), Write() {}
WriteRef()
: IID(INVALID_IID), WriteBackCycle(), WriteResID(), RegisterID(),
Write() {}
WriteRef(unsigned SourceIndex, WriteState *WS);
unsigned getSourceIndex() const { return IID; }

View File

@ -25,7 +25,8 @@ namespace mca {
const unsigned WriteRef::INVALID_IID = std::numeric_limits<unsigned>::max();
WriteRef::WriteRef(unsigned SourceIndex, WriteState *WS)
: IID(SourceIndex), WriteBackCycle(), WriteResID(), Write(WS) {}
: IID(SourceIndex), WriteBackCycle(), WriteResID(), RegisterID(),
Write(WS) {}
void WriteRef::commit() {
assert(Write && Write->isExecuted() && "Cannot commit before write back!");