I'm running into some problems where I'm tracediffing two x86 runs and getting some seemingly spurious differences in the decode output.
The key question I have is: what is the meaning of the machInst field of a micro op? The problem seems to be in the code below (from http://repo.gem5.org/gem5/file/d062cc7a8bdf/src/cpu/simple/base.cc#l403). Note that if we're executing a macroop, then curMacroStaticInst has the correct machInst, but the DPRINTF at the bottom is printing the machInst from the microop (via curStaticInst), which appears in at least some cases to be garbage. Am I diagnosing this properly? Any ideas on a fix? Steve //If we decoded an instruction and it's microcoded, start pulling //out micro ops if (instPtr && instPtr->isMacroop()) { curMacroStaticInst = instPtr; curStaticInst = curMacroStaticInst->fetchMicroop(pcState.microPC()); } else { curStaticInst = instPtr; } } else { //Read the next micro op from the macro op curStaticInst = curMacroStaticInst->fetchMicroop(pcState.microPC()); } //If we decoded an instruction this "tick", record information about it. if(curStaticInst) { #if TRACING_ON traceData = tracer->getInstRecord(curTick(), tc, curStaticInst, thread->pcState(), curMacroStaticInst); DPRINTF(Decode,"Decode: Decoded %s instruction: 0x%x\n", curStaticInst->getName(), curStaticInst->machInst); #endif // TRACING_ON } _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
