x86: Fix some style issues in the microcode ROM class.

Change-Id: I64fb5efbc9f63298c103816503f4718308032eb4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32896
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2020-08-17 23:09:46 -07:00
parent 32020236cf
commit fff5b8e745

View File

@@ -35,41 +35,46 @@
namespace X86ISAInst
{
class MicrocodeRom
class MicrocodeRom
{
protected:
typedef StaticInstPtr (*GenFunc)(StaticInstPtr);
static const MicroPC numMicroops;
GenFunc *genFuncs;
public:
//Constructor.
MicrocodeRom();
//Destructor.
~MicrocodeRom()
{
protected:
delete [] genFuncs;
}
typedef StaticInstPtr (*GenFunc)(StaticInstPtr);
StaticInstPtr
fetchMicroop(MicroPC microPC, StaticInstPtr curMacroop)
{
microPC = normalMicroPC(microPC);
if (microPC >= numMicroops)
return X86ISA::badMicroop;
else
return genFuncs[microPC](curMacroop);
}
};
static const MicroPC numMicroops;
GenFunc * genFuncs;
public:
//Constructor.
MicrocodeRom();
//Destructor.
~MicrocodeRom()
{
delete [] genFuncs;
}
StaticInstPtr
fetchMicroop(MicroPC microPC, StaticInstPtr curMacroop)
{
microPC = normalMicroPC(microPC);
if (microPC >= numMicroops)
return X86ISA::badMicroop;
else
return genFuncs[microPC](curMacroop);
}
};
}
} // namespace X86ISAInst
namespace X86ISA
{
using X86ISAInst::MicrocodeRom;
using X86ISAInst::MicrocodeRom;
}
#endif // __ARCH_X86_MICROCODE_ROM_HH__