CPU: Tidy up some formatting and a DPRINTF in the simple CPU base class.

Put the { on the same line as the if and put a space between the if and the
open paren. Also, use the # format modifier which puts a 0x in front of hex
values automatically. If the ExtMachInst type isn't integral and actually
prints something more complicated, the # falls away harmlessly and we aren't
left with a phantom 0x followed by a bunch of unrelated text.
This commit is contained in:
Gabe Black 2012-04-15 12:35:49 -07:00
parent 8fe112d61b
commit a5187f9d96

View file

@ -414,13 +414,12 @@ BaseSimpleCPU::preExecute()
}
//If we decoded an instruction this "tick", record information about it.
if(curStaticInst)
{
if (curStaticInst) {
#if TRACING_ON
traceData = tracer->getInstRecord(curTick(), tc,
curStaticInst, thread->pcState(), curMacroStaticInst);
DPRINTF(Decode,"Decode: Decoded %s instruction: 0x%x\n",
DPRINTF(Decode,"Decode: Decoded %s instruction: %#x\n",
curStaticInst->getName(), curStaticInst->machInst);
#endif // TRACING_ON
}