diff --git a/SMPInstr.cpp b/SMPInstr.cpp index 22301dead8078cbb71920685af67b3a78d1ff7f8..508470e352265d90a03664032abb57a0cf8b3a3f 100644 --- a/SMPInstr.cpp +++ b/SMPInstr.cpp @@ -667,11 +667,13 @@ void SMPInstr::MDFixupDefUseLists(void) { } } // end else if (7 == OptType) - // Next, add the flags register to the DEFs and USEs for those instructions that - // are marked as defining or using flags. +#if 0 // Not true for LOOP instructions that use only the ECX counter register. if (this->type == COND_BRANCH) { assert(SMPUsesFlags[this->SMPcmd.itype]); } +#endif + // Next, add the flags register to the DEFs and USEs for those instructions that + // are marked as defining or using flags. if (!this->DefsFlags && SMPDefsFlags[this->SMPcmd.itype]) { this->MDAddRegDef(X86_FLAGS_REG, false); this->DefsFlags = true; @@ -922,11 +924,14 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, FILE *AnnotFile) { SDTInstrumentation = true; break; // treat as category 0 } - if (SecondSrcOperandNum) { // treat as category 1 + if (SecondSrcOperandNum && !this->MDIsFrameAllocInstr()) { // treat as category 1 qfprintf(AnnotFile, "%10x %6d INSTR LOCAL %s %s \n", addr, -1, OptExplanation[OptType], disasm); ++AnnotationCount[OptType]; } + else { + SDTInstrumentation = true; + } break; }