From a5187f9d966d967254c71e1fb3545a4745aadc75 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 15 Apr 2012 12:35:49 -0700 Subject: [PATCH] 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. --- src/cpu/simple/base.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc index a5951035e..ca4090870 100644 --- a/src/cpu/simple/base.cc +++ b/src/cpu/simple/base.cc @@ -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 }