diff --git a/include/base/SMPBasicBlock.h b/include/base/SMPBasicBlock.h index f2cda26d4a14908fb9342e9eaeb8b3064d1094d3..adbc9c9c902a5a2737a47297bbc9a999fd6ef8e4 100644 --- a/include/base/SMPBasicBlock.h +++ b/include/base/SMPBasicBlock.h @@ -352,13 +352,13 @@ public: bool AnalyzeMemSet(STARS_ea_t MemSetAddr, STARSOpndTypePtr &MemSetTarget, std::size_t &MemSetSize, int &SignedOffset, bool &FPRelativeTarget); bool IsInfiniteSelfLoop(void); // return true if block loops infinitely to itself - bool IsBenignOverflowDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, std::size_t DefAddr, bool UnderflowOpcode, int &IdiomCode); // Do we not care if DEF overflowed, due to how it is used? + bool IsBenignOverflowDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr, bool UnderflowOpcode, int &IdiomCode); // Do we not care if DEF overflowed, due to how it is used? bool IsDEFWrittenWithTruncation(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr, STARS_ea_t TruncAddr, bool PhiDEF); // Is subword of DefOp written later, before TruncAddr? - bool IsBenignTruncationDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, std::size_t DefAddr, int &IdiomCode); // Do we not care if DEF overflowed, due to how it is used? + bool IsBenignTruncationDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr, int &IdiomCode); // Do we not care if DEF overflowed, due to how it is used? bool IsDefMaskedOrShiftedRight(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr); // Does DefOp+DefSSANum get subreg masked or right shifted before it gets re-DEFined? bool IsCriticalSink(const STARSOpndTypePtr &DefOp, int DefSSANum, std::string &SinkString, bool &FoundAnyCall); // What is ultimate use of DEF that might have integer error? bool IsStackOpNextUsedWithSignedness(const STARSOpndTypePtr &StackDefOp, STARS_ea_t DefAddr, int SSANum); // Is next use of stack DEF a sign- or zero-extended load? - void SuppressAnnotOnSignChangingAddition(const STARSOpndTypePtr &DefOp, int DefSSANum, std::size_t DefAddr); // Find inc/add that makes small negative back into positive + void SuppressAnnotOnSignChangingAddition(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr); // Find inc/add that makes small negative back into positive void AnalyzePrepForNumericAnnotations(void); // Last-minute prep before emitting numeric annotations // Is DefOp+DefSSANum (from WorkList head) at DefAddr used as address reg or as source operand in unsafe memory write? bool IsDefUsedInUnsafeMemWrite(std::list<std::pair<std::pair<STARSOpndTypePtr, int>, STARS_ea_t> > &WorkList, const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr); diff --git a/include/base/SMPFunction.h b/include/base/SMPFunction.h index 1d6adc6d0275bfbbb14977096dcbe83d975f675c..382544e2277b89d96010f8423b663a56a49dcfdf 100644 --- a/include/base/SMPFunction.h +++ b/include/base/SMPFunction.h @@ -386,8 +386,8 @@ public: void FindRedundantMetadata(void); // Do consecutive DEFs have same type? void SparseConditionalConstantPropagation(void); // perform SCCP to find constant values for DEFs, store in this->ConstantDefs void EvaluateAllPhiConstants(int BlockNum, std::vector<STARSBitSet> ExecutedEdgeBitSet, std::list<std::pair<int, int> > &SSAWorkList); // part of SCCP processing; propagate const DEFs into Phi USEs and Phi DEFs - bool IsBenignUnderflowDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, std::size_t DefAddr, int &IdiomCode); // Do we not care if DEF underflowed, due to how it is used? - bool HasIntErrorCallSink(const STARSOpndTypePtr &DefOp, int DefSSANum, std::size_t DefAddr, std::string &SinkString, bool &FoundAnyCall); // DEF is passed to known system/lib call + bool IsBenignUnderflowDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr, int &IdiomCode); // Do we not care if DEF underflowed, due to how it is used? + bool HasIntErrorCallSink(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr, std::string &SinkString, bool &FoundAnyCall); // DEF is passed to known system/lib call bool WritesAboveLocalFrame(const STARSOpndTypePtr &DestOp, bool OpNormalized, STARS_ea_t InstAddr); // Is DestOp direct stack access to caller's frame? bool AccessAboveLocalFrame(const STARSOpndTypePtr &StackOp, bool OpNormalized, STARS_ea_t InstAddr, bool WriteAccess); // Is StackOp direct stack access to caller's frame? bool IsDefUsedInUnsafeMemWrite(STARSOpndTypePtr DefOp, int DefSSANum, STARS_ea_t DefAddr); // Is Defop+DefSSANum at DefAddr used as address reg or as source operand in unsafe memory write? diff --git a/src/base/ProfilerInformation.cpp b/src/base/ProfilerInformation.cpp index 461be192ba177ccc58bc66abdd8e92bdfc74b7e4..892705309dcee3a383580fed7aad06df35eab65c 100644 --- a/src/base/ProfilerInformation.cpp +++ b/src/base/ProfilerInformation.cpp @@ -174,9 +174,9 @@ ProfilerInformation::ProfilerInformation(const char* fn, SMPProgram *CurrProg) assert(0 == ResultCode); std::string output_string(remainder); #if 1 - SMP_snprintf(remainder, sizeof(remainder), "%x %d %s %s ", addr, size_type_u.size, "INSTR", "PROF_FIELD"); + SMP_snprintf(remainder, sizeof(remainder), "%llx %d %s %s ", (unsigned long long)addr, size_type_u.size, "INSTR", "PROF_FIELD"); #else - qsnprintf(remainder, sizeof(remainder), "%x %d %s %s ", addr, size_type_u.size, "INSTR", "PROF_FIELD"); + qsnprintf(remainder, sizeof(remainder), "%llx %d %s %s ", (unsigned long long)addr, size_type_u.size, "INSTR", "PROF_FIELD"); #endif output_string = string(remainder) + output_string; constant_info.push_back(*new std::string(output_string)); @@ -296,18 +296,18 @@ ProfilerInformation::~ProfilerInformation() { if (ii->getNumericCount()) { - SMP_fprintf(fout, "%lx %d %s %lld Profiler generated, summarized by idal\n", - (unsigned long) addr, 0, "PROFILEDNUMERIC", ii->getNumericCount()); + SMP_fprintf(fout, "%llx %d %s %lld Profiler generated, summarized by idal\n", + (unsigned long long) addr, 0, "PROFILEDNUMERIC", ii->getNumericCount()); } if (ii->getPointerCount()) { - SMP_fprintf(fout, "%lx %d %s %lld Profiler generated, summarized by idal\n", - (unsigned long) addr, 0, "PROFILEDPOINTER", ii->getPointerCount()); + SMP_fprintf(fout, "%llx %d %s %lld Profiler generated, summarized by idal\n", + (unsigned long long) addr, 0, "PROFILEDPOINTER", ii->getPointerCount()); } if (ii->getOtherCount()) { - SMP_fprintf(fout, "%lx %d %s %lld Profiler generated, summarized by idal\n", - (unsigned long) addr, 0, "PROFILEDOTHER", ii->getOtherCount()); + SMP_fprintf(fout, "%llx %d %s %lld Profiler generated, summarized by idal\n", + (unsigned long long) addr, 0, "PROFILEDOTHER", ii->getOtherCount()); } delete ii; } @@ -325,7 +325,7 @@ ProfilerInformation::~ProfilerInformation() { { STARS_ea_t source=iter->first; STARS_ea_t target=*iter2; - SMP_fprintf(fout, "%lx 0 INSTR INDIRECTCALL %lu Profiler generated, idal summarized\n", (unsigned long) source, (unsigned long) target); + SMP_fprintf(fout, "%llx 0 INSTR INDIRECTCALL %llx Profiler generated, idal summarized\n", (unsigned long long) source, (unsigned long long) target); } } @@ -368,8 +368,8 @@ void ProfilerInformation::profileAddressingInformation ) { char buffer[1000]; - (void) SMP_snprintf(buffer, sizeof(buffer), "%lx %d %s %s %lu %s %lx Profiler generated, idal summarized\n", - (unsigned long) addr, size, type, scope, (unsigned long) the_const, field, (unsigned long) real_const); + (void) SMP_snprintf(buffer, sizeof(buffer), "%llx %d %s %s %lu %s %llx Profiler generated, idal summarized\n", + (unsigned long long) addr, size, type, scope, (unsigned long) the_const, field, (unsigned long long) real_const); constant_info.push_back(std::string(buffer)); } diff --git a/src/base/SMPBasicBlock.cpp b/src/base/SMPBasicBlock.cpp index 9aaf8f0baffbd650ecb3219352775e2711470c4f..6c1ae0ad3b5016a54fa6470ba33097898eb96b19 100644 --- a/src/base/SMPBasicBlock.cpp +++ b/src/base/SMPBasicBlock.cpp @@ -1,3 +1,4 @@ + /* * SMPBasicBlock.cpp - Class file for basic block analysis. * @@ -4369,7 +4370,7 @@ bool SMPBasicBlock::HasConditionalBranch(void) { // We don't care if we overflow computing some DEFs, because of how they are used. // Return true when we detect one of these cases. -bool SMPBasicBlock::IsBenignOverflowDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, std::size_t DefAddr, bool UnderflowOpcode, int &IdiomCode) { +bool SMPBasicBlock::IsBenignOverflowDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr, bool UnderflowOpcode, int &IdiomCode) { bool benign = false; vector<SMPInstr *>::iterator InstIter; set<DefOrUse, LessDefUse>::iterator UseIter, DefIter; @@ -5017,7 +5018,7 @@ bool SMPBasicBlock::IsDEFWrittenWithTruncation(const STARSOpndTypePtr &DefOp, in // We don't care if we truncate computing some DEFs, because of how they are used. // Return true when we detect one of these cases. -bool SMPBasicBlock::IsBenignTruncationDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, std::size_t DefAddr, int &IdiomCode) { +bool SMPBasicBlock::IsBenignTruncationDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr, int &IdiomCode) { bool benign = false; vector<SMPInstr *>::iterator InstIter; set<DefOrUse, LessDefUse>::iterator UseIter, UseIter2, DefIter; @@ -5581,7 +5582,7 @@ bool SMPBasicBlock::IsStackOpNextUsedWithSignedness(const STARSOpndTypePtr &Stac // add edx,1 ; converts 0 or -1 to 1 or 0 (looks like unsigned overflow); catch this here. // We also catch the case in which a "not edx" or "and edx,..." or "or edx,..." instruction // is interposed between the sbb and the add. -void SMPBasicBlock::SuppressAnnotOnSignChangingAddition(const STARSOpndTypePtr &DefOp, int DefSSANum, std::size_t DefAddr) { +void SMPBasicBlock::SuppressAnnotOnSignChangingAddition(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr) { vector<SMPInstr *>::iterator DefInstIter = this->GetInstIterFromAddr(DefAddr); int SearchSSANum = DefSSANum; set<DefOrUse, LessDefUse>::iterator UseIter, DefIter; @@ -5719,8 +5720,8 @@ void SMPBasicBlock::AnalyzePrepForNumericAnnotations(void) { this->GetFunc()->ResetProcessedBlocks(); // prevent infinite recursion in IsOpSourceByteSwap() STARS_ea_t ByteSwapAddr; if (CurrInst->IsOpSourceByteSwap(ArgSourceOp, UseSSANum, ByteSwapAddr)) { - SMP_fprintf(global_STARS_program->GetAlarmFile(), "ALARM: Call to %s at %lx receives user-tainted argument at %lx which was tainted at %lx\n", - TaintFuncName.c_str(), (unsigned long) FirstTaintSensitiveCallAddr, (unsigned long) InstAddr, (unsigned long) ByteSwapAddr); + SMP_fprintf(global_STARS_program->GetAlarmFile(), "ALARM: Call to %s at %llx receives user-tainted argument at %llx which was tainted at %llx\n", + TaintFuncName.c_str(), (unsigned long long) FirstTaintSensitiveCallAddr, (unsigned long long) InstAddr, (unsigned long long) ByteSwapAddr); break; } } @@ -5949,15 +5950,15 @@ STARS_sval_t SMPBasicBlock::ComputeStackAdjustmentAfterCall(STARS_ea_t CallAddr) if (SMP_STACK_DELTA_ERROR_CODE == CurrentDelta) { // An error will soon occur, no need for further computations. AdjustmentBytes = 0; - SMP_msg("INFO: Stack adjustment set to zero due to error code at %lx\n", (unsigned long) InstAddr); + SMP_msg("INFO: Stack adjustment set to zero due to error code at %llx\n", (unsigned long long) InstAddr); break; } else if (SMP_STACK_POINTER_BITWISE_AND_CODE == CurrentDelta) { ; // Ignore AND with stack pointer for now } else if (0 != CurrentDelta) { - SMP_msg("INFO: Found stack adjustment of %ld bytes at %lx\n", - (long) CurrentDelta, (unsigned long) InstAddr); + SMP_msg("INFO: Found stack adjustment of %ld bytes at %llx\n", + (long) CurrentDelta, (unsigned long long) InstAddr); AdjustmentBytes += CurrentDelta; } // NOTE: ****!!!!****!!!! We want to find changes in stack direction and terminate @@ -5976,8 +5977,8 @@ STARS_sval_t SMPBasicBlock::ComputeStackAdjustmentAfterCall(STARS_ea_t CallAddr) // conservatively treat jumps as probable tail calls, which will later be given the RETURN // data flow type but have not yet been analyzed and marked. AdjustmentBytes = 0; - SMP_msg("INFO: Resetting stack adjustment to zero at return inst at %lx\n", - (unsigned long) InstAddr); + SMP_msg("INFO: Resetting stack adjustment to zero at return inst at %llx\n", + (unsigned long long) InstAddr); break; } else { @@ -6107,4 +6108,4 @@ bool SMPBasicBlock::IsDefUsedInUnsafeMemWrite(list<pair<pair<STARSOpndTypePtr, i return FoundMemWriteUse; #endif -} // end of SMPBasicBlock::IsDefUsedInUnsafeMemWrite() \ No newline at end of file +} // end of SMPBasicBlock::IsDefUsedInUnsafeMemWrite() diff --git a/src/base/SMPDataFlowAnalysis.cpp b/src/base/SMPDataFlowAnalysis.cpp index 8d529c2a6bda920d9d6a3881888b7f913f24a6b8..66c4ed1417802d029de444ff6601449797539112 100644 --- a/src/base/SMPDataFlowAnalysis.cpp +++ b/src/base/SMPDataFlowAnalysis.cpp @@ -919,7 +919,7 @@ void PrintListOperand(const STARSOpndTypePtr &Opnd, int SSANum) { void AnnotPrintOperand(const STARSOpndTypePtr &Opnd, FILE *OutFile) { if (Opnd->IsStaticMemOp()) { - SMP_fprintf(OutFile, " %lx", (unsigned long) Opnd->GetAddr()); + SMP_fprintf(OutFile, " %llx", (unsigned long long) Opnd->GetAddr()); if (Opnd->HasSIBByte()) { AnnotPrintSIB(Opnd, false, OutFile); } @@ -962,7 +962,7 @@ void AnnotPrintOperand(const STARSOpndTypePtr &Opnd, FILE *OutFile) { SMP_fprintf(OutFile, " %ld", (long) Opnd->GetImmedValue()); } else if ((Opnd->IsFarPointer()) || (Opnd->IsNearPointer())) { - SMP_fprintf(OutFile, " %lx", (unsigned long) Opnd->GetAddr()); + SMP_fprintf(OutFile, " %llx", (unsigned long long) Opnd->GetAddr()); } else { SMP_fprintf(OutFile, " ERROROP"); diff --git a/src/base/SMPFunction.cpp b/src/base/SMPFunction.cpp index b38b9406d0b8ddecff2c2adf220c5200835c88ca..cd6aca5337f0d58bbcf7c7f193a1ea3edce3afc3 100644 --- a/src/base/SMPFunction.cpp +++ b/src/base/SMPFunction.cpp @@ -3820,31 +3820,31 @@ void SMPFunction::EmitStackFrameAnnotations(FILE *AnnotFile, SMPInstr *Instr) { #if 0 if (0 < IncomingArgsSize) { - SMP_fprintf(AnnotFile, "%10lx %6llu INARGS STACK esp + %ld %s \n", - (unsigned long) addr, (unsigned long long) IncomingArgsSize, + SMP_fprintf(AnnotFile, "%18llx %6llu INARGS STACK esp + %ld %s \n", + (unsigned long long) addr, (unsigned long long) IncomingArgsSize, (long) (LocalVarsSize + CalleeSavedRegsSize + RetAddrSize), Instr->GetDisasm()); } #endif if (0 < this->RetAddrSize) { - SMP_fprintf(AnnotFile, "%10lx %6d MEMORYHOLE STACK esp + %lu ReturnAddress \n", - (unsigned long) addr, RetAddrSize, (unsigned long) (this->LocalVarsSize + this->CalleeSavedRegsSize)); + SMP_fprintf(AnnotFile, "%18llx %6d MEMORYHOLE STACK esp + %lu ReturnAddress \n", + (unsigned long long) addr, RetAddrSize, (unsigned long) (this->LocalVarsSize + this->CalleeSavedRegsSize)); } if (0 < this->CalleeSavedRegsSize) { - SMP_fprintf(AnnotFile, "%10lx %6u MEMORYHOLE STACK esp + %lu CalleeSavedRegs \n", - (unsigned long) addr, this->CalleeSavedRegsSize, (unsigned long) this->LocalVarsSize); + SMP_fprintf(AnnotFile, "%18llx %6u MEMORYHOLE STACK esp + %lu CalleeSavedRegs \n", + (unsigned long long) addr, this->CalleeSavedRegsSize, (unsigned long) this->LocalVarsSize); } if ((0 < this->LocalVarsSize) && this->GoodLocalVarTable) { unsigned long ParentReferentID = global_STARS_program->GetDataReferentID(); global_STARS_program->IncrementDataReferentID(); - SMP_fprintf(AnnotFile, "%10lx %6lu DATAREF STACK %lu esp + %d PARENT LocalFrame LOCALFRAME\n", - (unsigned long) addr, (unsigned long) this->LocalVarsSize, ParentReferentID, 0); + SMP_fprintf(AnnotFile, "%18llx %6lu DATAREF STACK %lu esp + %d PARENT LocalFrame LOCALFRAME\n", + (unsigned long long) addr, (unsigned long) this->LocalVarsSize, ParentReferentID, 0); #if SMP_COMPUTE_STACK_GRANULARITY if (this->AnalyzedSP && !this->CallsAlloca && (STARS_BADADDR != this->LocalVarsAllocInstr)) { // We can only fine-grain the stack frame if we were able to analyze the stack if (this->OutgoingArgsSize > 0) { - SMP_fprintf(AnnotFile, "%10lx %6zu DATAREF STACK %lu esp + %d CHILDOF %lu OFFSET %d OutArgsRegion OUTARGS\n", - (unsigned long) addr, this->OutgoingArgsSize, global_STARS_program->GetDataReferentID(), 0, ParentReferentID, 0); + SMP_fprintf(AnnotFile, "%18llx %6zu DATAREF STACK %lu esp + %d CHILDOF %lu OFFSET %d OutArgsRegion OUTARGS\n", + (unsigned long long) addr, this->OutgoingArgsSize, global_STARS_program->GetDataReferentID(), 0, ParentReferentID, 0); global_STARS_program->IncrementDataReferentID(); } #if SMP_DEBUG_STACK_GRANULARITY @@ -3861,8 +3861,8 @@ void SMPFunction::EmitStackFrameAnnotations(FILE *AnnotFile, SMPInstr *Instr) { if ((this->LocalVarTable[i].offset >= (long) this->FuncInfo->GetFrameSize()) || (this->LocalVarTable[i].offset < (long) this->OutgoingArgsSize)) continue; - SMP_fprintf(AnnotFile, "%10lx %6zu DATAREF STACK %lu esp + %ld CHILDOF %lu OFFSET %ld LOCALVAR %s \n", - (unsigned long) addr, this->LocalVarTable[i].size, global_STARS_program->GetDataReferentID(), + SMP_fprintf(AnnotFile, "%18llx %6zu DATAREF STACK %lu esp + %ld CHILDOF %lu OFFSET %ld LOCALVAR %s \n", + (unsigned long long) addr, this->LocalVarTable[i].size, global_STARS_program->GetDataReferentID(), this->LocalVarTable[i].offset, ParentReferentID, this->LocalVarTable[i].offset, this->LocalVarTable[i].VarName); global_STARS_program->IncrementDataReferentID(); @@ -5173,7 +5173,7 @@ void SMPFunction::EvaluateAllPhiConstants(int BlockNum, vector<STARSBitSet> Exec } // end of SMPFunction::EvaluateAllPhiConstants() // Do we not care if DEF underflowed, due to how it is used? -bool SMPFunction::IsBenignUnderflowDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, std::size_t DefAddr, int &IdiomCode) { +bool SMPFunction::IsBenignUnderflowDEF(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr, int &IdiomCode) { bool benign = false; list<SMPInstr *>::iterator InstIter; set<DefOrUse, LessDefUse>::iterator DefIter, UseIter; @@ -5236,7 +5236,7 @@ bool SMPFunction::IsBenignUnderflowDEF(const STARSOpndTypePtr &DefOp, int DefSSA return benign; } // end of SMPFunction::IsBenignUnderflowDEF() -bool SMPFunction::HasIntErrorCallSink(const STARSOpndTypePtr &DefOp, int DefSSANum, std::size_t DefAddr, std::string &SinkString, bool &FoundAnyCall) { +bool SMPFunction::HasIntErrorCallSink(const STARSOpndTypePtr &DefOp, int DefSSANum, STARS_ea_t DefAddr, std::string &SinkString, bool &FoundAnyCall) { this->ResetProcessedBlocks(); // prepare for recursion through blocks SinkString.clear(); SMPBasicBlock *CurrBlock = this->GetBlockFromInstAddr(DefAddr); @@ -8148,11 +8148,11 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { || (this->HasUnresolvedIndirectJumps()) || (this->HasSharedChunks())); if (this->StaticFunc) { - SMP_fprintf(AnnotFile, "%10lx %6zu FUNC LOCAL %s ", (unsigned long) this->GetStartAddr(), + SMP_fprintf(AnnotFile, "%18llx %6zu FUNC LOCAL %s ", (unsigned long long) this->GetStartAddr(), this->Size, this->GetFuncName()); } else { - SMP_fprintf(AnnotFile, "%10lx %6zu FUNC GLOBAL %s ", (unsigned long) this->GetStartAddr(), + SMP_fprintf(AnnotFile, "%18llx %6zu FUNC GLOBAL %s ", (unsigned long long) this->GetStartAddr(), this->Size, this->GetFuncName()); } switch (this->GetReturnAddressStatus()) @@ -8192,14 +8192,14 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { SMP_fprintf(AnnotFile, "FUNC_LEAF "); // Store the first return instruction's address // NOTE: This was useless info and we just print an address to keep the line format the same for easy parsing. - SMP_fprintf(AnnotFile,"%10lx ", (unsigned long) (this->FuncInfo->get_startEA() + this->FuncInfo->GetFuncSize() - 1)); + SMP_fprintf(AnnotFile,"%18llx ", (unsigned long long) (this->FuncInfo->get_startEA() + this->FuncInfo->GetFuncSize() - 1)); if (this->IsLibFunc()) SMP_fprintf(AnnotFile, "LIBRARY "); SMP_fprintf(AnnotFile, "\n"); // Emit annotations about how to restore register values - SMP_fprintf(AnnotFile, "%10lx %6d FUNC FRAMERESTORE ", (unsigned long) this->GetStartAddr(), 0); + SMP_fprintf(AnnotFile, "%18llx %6d FUNC FRAMERESTORE ", (unsigned long long) this->GetStartAddr(), 0); for (int i = STARS_x86_R_ax; i <= global_STARS_program->GetSTARS_MD_LAST_SAVED_REG_NUM(); i++) { SMP_fprintf(AnnotFile, "%d %d %d ", i, this->SavedRegLoc[i], this->ReturnRegTypes[i]); } @@ -8207,7 +8207,7 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { // Print type left in the return register. if (MD_RETURN_VALUE_REG != STARS_x86_R_none) { - SMP_fprintf(InfoAnnotFile, "%10lx %6u FUNC RETURNTYPE ", (unsigned long) this->GetStartAddr(), this->Size); + SMP_fprintf(InfoAnnotFile, "%18llx %6u FUNC RETURNTYPE ", (unsigned long long) this->GetStartAddr(), this->Size); SMP_fprintf(InfoAnnotFile, "%s %d\n", MDGetRegNumName(MD_RETURN_VALUE_REG, global_STARS_program->GetSTARS_ISA_Bytewidth()), this->ReturnRegTypes[MD_RETURN_VALUE_REG]); } // Print types of incoming arguments, if any. @@ -8218,7 +8218,7 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { if (ArgLimit >= STARS_MAX_ARGS_PER_FUNC) { ArgLimit = STARS_MAX_ARGS_PER_FUNC - 1; } - SMP_fprintf(InfoAnnotFile, "%10lx %6u FUNC INARGS %4u ", (unsigned long) this->GetStartAddr(), this->Size, + SMP_fprintf(InfoAnnotFile, "%18llx %6u FUNC INARGS %4u ", (unsigned long long) this->GetStartAddr(), this->Size, ArgLimit + 1); for (ArgIndex = 0; ArgIndex <= ArgLimit; ++ArgIndex) { SMP_fprintf(InfoAnnotFile, "ARG%u %u ", ArgIndex, this->InArgTypes[ArgIndex]); @@ -8226,7 +8226,7 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { SMP_fprintf(InfoAnnotFile, "\n"); } - SMP_fprintf(AnnotFile, "%10lx %6d FUNC MMSAFENESS ", (unsigned long) this->GetStartAddr(), 0); + SMP_fprintf(AnnotFile, "%18llx %6d FUNC MMSAFENESS ", (unsigned long long) this->GetStartAddr(), 0); if (!IsSpecSafe()) SMP_fprintf(AnnotFile, "UNSAFE\n"); else if (!IsSafe()) @@ -8239,7 +8239,7 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { // If function has problems that limited our analyses, emit an information annotation so that // other tools can be aware of which analyses will be sound. if (FuncHasProblems) { - SMP_fprintf(InfoAnnotFile, "%10lx %6zu FUNC PROBLEM %s ", (unsigned long) this->GetStartAddr(), + SMP_fprintf(InfoAnnotFile, "%18llx %6zu FUNC PROBLEM %s ", (unsigned long long) this->GetStartAddr(), this->Size, this->GetFuncName()); if (!this->AnalyzedSP) { SMP_fprintf(InfoAnnotFile, "STACKANALYSIS "); @@ -8272,8 +8272,8 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { if (CurrInst->IsFloatNop()) { SMP_msg("WARNING: FloatNop not used as marker instruction at %llx\n", (uint64_t) addr); } - SMP_fprintf(AnnotFile, "%10lx %6zu INSTR BELONGTO %lx \n", - (unsigned long) addr, CurrInst->GetSize(), (unsigned long) GetStartAddr()); + SMP_fprintf(AnnotFile, "%18llx %6zu INSTR BELONGTO %llx \n", + (unsigned long long) addr, CurrInst->GetSize(), (unsigned long long) GetStartAddr()); if (this->LocalVarsAllocInstr == addr) { AllocSeen = true; if (this->NeedsStackReferent) @@ -8283,12 +8283,12 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { if (5 == OptType) { // ADD or SUB // Prevent mmStrata from extending the caller's stack frame // to include the new allocation. - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL SafeFrameAlloc %s \n", - (unsigned long) addr, -1, CurrInst->GetDisasm()); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL SafeFrameAlloc %s \n", + (unsigned long long) addr, -1, CurrInst->GetDisasm()); } else if (CurrInst->MDIsPushInstr()) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL NoWarn %s \n", - (unsigned long) addr, -3, CurrInst->GetDisasm()); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL NoWarn %s \n", + (unsigned long long) addr, -3, CurrInst->GetDisasm()); } // mmStrata ignores the DATAREF annotations anyway, so even though // they are not needed, emit them for use by Strata and other tools @@ -8310,7 +8310,7 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { DeallocTrigger = true; } else if (DeallocTrigger) { // Time for annotation - SMP_fprintf(AnnotFile, "%10lx %6lu DEALLOC STACK esp - %lu %s\n", (unsigned long) addr, + SMP_fprintf(AnnotFile, "%18llx %6lu DEALLOC STACK esp - %lu %s\n", (unsigned long long) addr, (unsigned long) this->LocalVarsSize, (unsigned long) this->LocalVarsSize, CurrInst->GetDisasm()); DeallocTrigger = false; } @@ -8363,8 +8363,8 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { } } - SMP_fprintf(AnnotFile, "%10lx %6zu INSTR BELONGTO %lx \n", - (unsigned long) addr, CurrInst->GetSize(), (unsigned long) GetStartAddr()); + SMP_fprintf(AnnotFile, "%18llx %6zu INSTR BELONGTO %llx \n", + (unsigned long long) addr, CurrInst->GetSize(), (unsigned long long) GetStartAddr()); SMPitype CurrDataFlow = CurrInst->GetDataFlowType(); if ((CurrDataFlow == INDIR_JUMP) || (CurrDataFlow == INDIR_CALL)) { global_STARS_program->PrintAllCodeToCodeXrefs(addr, CurrInst->GetSize()); @@ -8379,12 +8379,12 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { if (5 == OptType) { // ADD or SUB // Prevent mmStrata from extending the caller's stack frame // to include the new allocation. - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL SafeFrameAlloc %s \n", - (unsigned long) addr, -1, CurrInst->GetDisasm()); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL SafeFrameAlloc %s \n", + (unsigned long long) addr, -1, CurrInst->GetDisasm()); } else if (CurrInst->MDIsPushInstr()) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL NoWarn %s \n", - (unsigned long) addr, -3, CurrInst->GetDisasm()); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL NoWarn %s \n", + (unsigned long long) addr, -3, CurrInst->GetDisasm()); } // mmStrata ignores the DATAREF annotations anyway, so even though // they are not needed, emit them for use by Strata and other tools @@ -8406,7 +8406,7 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { DeallocTrigger = true; } else if (DeallocTrigger) { // Time for annotation - SMP_fprintf(AnnotFile, "%10lx %6lu DEALLOC STACK esp - %lu %s\n", (unsigned long) addr, + SMP_fprintf(AnnotFile, "%18llx %6lu DEALLOC STACK esp - %lu %s\n", (unsigned long long) addr, (unsigned long) this->LocalVarsSize, (unsigned long) this->LocalVarsSize, CurrInst->GetDisasm()); DeallocTrigger = false; } @@ -8438,7 +8438,7 @@ void SMPFunction::EmitAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { if ((*CurrInst)->IsMarkerInst()) ++CurrInst; STARS_ea_t addr = (*CurrInst)->GetAddr(); - SMP_fprintf(AnnotFile, "%10x %6d BLOCK PROFILECOUNT %s\n", addr, + SMP_fprintf(AnnotFile, "%18llx %6d BLOCK PROFILECOUNT %s\n", (unsigned long long)addr, (*CurrInst)->GetSize(), (*CurrInst)->GetDisasm()); #endif } diff --git a/src/base/SMPInstr.cpp b/src/base/SMPInstr.cpp index 62f991a304475239dd6e2aa3d6f2f7eb82d6559d..63053b2573578f929fcc0885bcd26ca6734713cf 100644 --- a/src/base/SMPInstr.cpp +++ b/src/base/SMPInstr.cpp @@ -1840,8 +1840,8 @@ set<DefOrUse, LessDefUse>::iterator SMPInstr::GetPointerAddressReg(const STARSOp set<DefOrUse, LessDefUse>::iterator PtrIter; if ((NULL == this->BasicBlock) || (NULL == this->BasicBlock->GetFunc())) { - SMP_msg("ERROR: NULL member pointers in SMPInstr::GetPointerAddressReg() at %lx \n", - (unsigned long) this->GetAddr()); + SMP_msg("ERROR: NULL member pointers in SMPInstr::GetPointerAddressReg() at %llx \n", + (unsigned long long) this->GetAddr()); return this->GetLastUse(); } bool UseFP = this->BasicBlock->GetFunc()->UsesFramePointer(); @@ -1988,7 +1988,7 @@ void SMPInstr::PrintOperands(void) const { // Complete DEBUG printing. void SMPInstr::Dump(void) { - SMP_msg("%lx %d SMPitype: %d %s\n", (unsigned long) this->GetAddr(), this->GetSize(), (int) this->type, + SMP_msg("%llx %d SMPitype: %d %s\n", (unsigned long long) this->GetAddr(), this->GetSize(), (int) this->type, DisAsmText.GetDisAsm(this->GetAddr(), this->IsMarkerInst())); #if STARS_DUMP_FG_INFO SMP_msg("USEs: "); @@ -5392,12 +5392,15 @@ void SMPInstr::MDFixupCallDefUseLists(void) { bool ErasedDEF = false; if (CalleeFunc->IsRegPreserved(RegNum)) { DefIter = this->FindDef(SearchOp); - assert(DefIter != this->GetLastDef()); - this->EraseDef(DefIter); - ErasedDEF = true; - UseIter = this->FindUse(SearchOp); - assert(UseIter != this->GetLastUse()); - this->EraseUse(UseIter); + // assert(DefIter != this->GetLastDef()); // not true for some reason? + if(DefIter != this->GetLastDef()) + { + this->EraseDef(DefIter); + ErasedDEF = true; + UseIter = this->FindUse(SearchOp); + assert(UseIter != this->GetLastUse()); + this->EraseUse(UseIter); + } } else if (CalleeAnalyzed && (!CalleeFunc->IsLiveIn(SearchOp))) { // Callee stack analysis was successful, so function LiveIn set was computed, @@ -10121,14 +10124,14 @@ void SMPInstr::MDAnnotateSIBStackConstants(FILE *AnnotFile, const STARSOpndTypeP if (BaseReg == MD_STACK_POINTER_REG) { // ESP cannot be IndexReg // ESP-relative constant offset SMP_fprintf(AnnotFile, - "%10lx %6d PTRIMMEDESP STACK %d displ %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); + "%18llx %6d PTRIMMEDESP STACK %d displ %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); } else if (UseFP && ((IndexReg == MD_FRAME_POINTER_REG) || (BaseReg == MD_FRAME_POINTER_REG))) { // EBP-relative constant offset SMP_fprintf(AnnotFile, - "%10lx %6d PTRIMMEDEBP STACK %d displ %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); + "%18llx %6d PTRIMMEDEBP STACK %d displ %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); } return; @@ -10167,14 +10170,14 @@ void SMPInstr::AnnotateStackConstants(bool UseFP, FILE *AnnotFile) { if (BaseReg == MD_STACK_POINTER_REG) { // ESP-relative constant offset SMP_fprintf(AnnotFile, - "%10lx %6d PTRIMMEDESP STACK %d displ %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); + "%18llx %6d PTRIMMEDESP STACK %d displ %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); } else if (UseFP && (BaseReg == MD_FRAME_POINTER_REG)) { // EBP-relative constant offset SMP_fprintf(AnnotFile, - "%10lx %6d PTRIMMEDEBP STACK %d displ %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); + "%18llx %6d PTRIMMEDEBP STACK %d displ %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); } } // end if (Opnd.hasSIB) ... else ... } // end if (Opnd.type == o_displ) @@ -10187,14 +10190,14 @@ void SMPInstr::AnnotateStackConstants(bool UseFP, FILE *AnnotFile) { if (BaseReg == MD_STACK_POINTER_REG) { // ESP-relative constant offset SMP_fprintf(AnnotFile, - "%10lx %6d PTRIMMEDESP STACK %d displ %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); + "%18llx %6d PTRIMMEDESP STACK %d displ %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); } else if (UseFP && (BaseReg == MD_FRAME_POINTER_REG)) { // EBP-relative constant offset SMP_fprintf(AnnotFile, - "%10lx %6d PTRIMMEDEBP STACK %d displ %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); + "%18llx %6d PTRIMMEDEBP STACK %d displ %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), SignedOffset, disasm); } } // end if (Opnd.hasSIB) ... else ... } // end else if (Opnd.type == o_phrase) @@ -10219,12 +10222,12 @@ void SMPInstr::AnnotateStackConstants(bool UseFP, FILE *AnnotFile) { // We are getting duplicate annotations for lea instructions. else { if (UseFP && this->GetFirstUse()->GetOp()->MatchesReg(MD_FRAME_POINTER_REG)) { - SMP_fprintf(AnnotFile, "%10lx %6d PTRIMMEDEBP STACK %d displ %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), ESPoffset, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d PTRIMMEDEBP STACK %d displ %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), ESPoffset, disasm); } else { - SMP_fprintf(AnnotFile, "%10lx %6d PTRIMMEDESP STACK %d displ %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), ESPoffset, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d PTRIMMEDESP STACK %d displ %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), ESPoffset, disasm); } } } @@ -10252,8 +10255,8 @@ void SMPInstr::EmitFastReturnStatus(unsigned short FastReturnStatus) { return; } - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR %s ", - (unsigned long) this->GetAddr(), this->GetSize(), InstrString); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR %s ", + (unsigned long long) this->GetAddr(), this->GetSize(), InstrString); if (global_STARS_program->ShouldSTARSPerformReducedAnalysis()) { SMP_fprintf(global_STARS_program->GetCallReturnFile(), "NOFASTRETURN REDUCEDANALYSIS"); @@ -10320,20 +10323,20 @@ void SMPInstr::EmitCallReturnStatus(SMPProgram *CurrProg) { } if (NULL == CalleeFunc) { SMP_msg("ERROR: Cannot find callee function for CALL at %llx \n", (unsigned long long) this->GetAddr()); - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR CALL RAUNSAFE %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR CALL RAUNSAFE %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); this->EmitFastReturnStatus((unsigned short) NO_CALLERS); } else { FuncType RetAddrStatus = CalleeFunc->GetReturnAddressStatus(); unsigned short FastReturnStatus = CalleeFunc->GetFastReturnStatus(); if (FUNC_SAFE != RetAddrStatus) { - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR CALL RAUNSAFE %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR CALL RAUNSAFE %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); } else { - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR CALL RASAFE %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR CALL RASAFE %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); } this->EmitFastReturnStatus(FastReturnStatus); } @@ -10341,8 +10344,8 @@ void SMPInstr::EmitCallReturnStatus(SMPProgram *CurrProg) { else if (INDIR_CALL == FlowType) { STARS_ea_t CalleeAddr = this->GetCallTarget(); if ((STARS_BADADDR == CalleeAddr) || global_STARS_program->ShouldSTARSPerformReducedAnalysis()) { - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR INDIRCALL RAUNSAFE UNKNOWNTARGET %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR INDIRCALL RAUNSAFE UNKNOWNTARGET %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); unsigned short DummyReturnStatus = INDIRECTLY_CALLED; this->EmitFastReturnStatus(DummyReturnStatus); } @@ -10356,20 +10359,20 @@ void SMPInstr::EmitCallReturnStatus(SMPProgram *CurrProg) { } if (NULL == CalleeFunc) { SMP_msg("ERROR: Cannot find callee function for CALL at %llx \n", (unsigned long long) this->GetAddr()); - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR CALL RAUNSAFE %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR CALL RAUNSAFE %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); this->EmitFastReturnStatus((unsigned short) NO_CALLERS); } else { FuncType RetAddrStatus = CalleeFunc->GetReturnAddressStatus(); unsigned short FastReturnStatus = CalleeFunc->GetFastReturnStatus(); if (FUNC_SAFE != RetAddrStatus) { - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR INDIRCALL RAUNSAFE %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR INDIRCALL RAUNSAFE %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); } else { - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR INDIRCALL RASAFE %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR INDIRCALL RASAFE %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); } this->EmitFastReturnStatus(FastReturnStatus); } @@ -10377,12 +10380,12 @@ void SMPInstr::EmitCallReturnStatus(SMPProgram *CurrProg) { } else if (RETURN == FlowType) { if (this->IsCondTailCall()) { - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR CALL CONDTAILCALL %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR CALL CONDTAILCALL %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); } else if (this->IsTailCall()) { - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR CALL TAILCALL %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR CALL TAILCALL %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); } else if (this->MDIsReturnInstr()) { FuncType RetAddrStatus = FUNC_UNSAFE; @@ -10393,12 +10396,12 @@ void SMPInstr::EmitCallReturnStatus(SMPProgram *CurrProg) { } if (FUNC_SAFE == RetAddrStatus) { - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR RETURN RASAFE %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR RETURN RASAFE %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); } else { - SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%10lx %6d INSTR RETURN RAUNSAFE %s\n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(global_STARS_program->GetCallReturnFile(), "%18llx %6d INSTR RETURN RAUNSAFE %s\n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); } this->EmitFastReturnStatus(FastReturnStatus); } @@ -10442,7 +10445,7 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE STARSOpndTypePtr AnnotDefOp = CloneIfNecessary(MemSrcOp, UseFP); // Need to unnormalize stack memory DEFs and USEs before printing annotations. this->MDGetUnnormalizedOp(AnnotDefOp); - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR MEMSRC %d", (unsigned long) addr, this->GetSize(), SrcBitWidth); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR MEMSRC %d", (unsigned long long) addr, this->GetSize(), SrcBitWidth); AnnotPrintOperand(AnnotDefOp, InfoAnnotFile); SMP_fprintf(InfoAnnotFile, " ZZ %s \n", disasm); } @@ -10452,7 +10455,7 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE STARSOpndTypePtr AnnotDefOp = CloneIfNecessary(MemDestOp, UseFP); // Need to unnormalize stack memory DEFs and USEs before printing annotations. this->MDGetUnnormalizedOp(AnnotDefOp); - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR MEMDEF %d", (unsigned long) addr, this->GetSize(), DestBitWidth); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR MEMDEF %d", (unsigned long long) addr, this->GetSize(), DestBitWidth); AnnotPrintOperand(AnnotDefOp, InfoAnnotFile); SMP_fprintf(InfoAnnotFile, " ZZ %s \n", disasm); } @@ -10479,8 +10482,8 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE FuncName.c_str(), (unsigned long) this->GetAddr()); } SMP_fprintf(global_STARS_program->GetAlarmFile(), "ALARM REASON: Call policy is DISALLOW for all calls of type %s\n", CallTypeNames[FuncCallType]); - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR SECURITYCALL Disallow 1 1 %s \n", - (unsigned long) addr, this->GetSize(), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR SECURITYCALL Disallow 1 1 %s \n", + (unsigned long long) addr, this->GetSize(), disasm); } } @@ -10504,8 +10507,8 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE // instructions that precede the LocalVarsAllocInstr // (i.e. the PUSHes of callee-saved regs). if ((!AllocSeen || !NeedsFrame) && this->MDIsPushInstr()) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL NoWarn %s \n", - (unsigned long) addr, -3, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL NoWarn %s \n", + (unsigned long long) addr, -3, disasm); NoWarnFlag = true; } else { @@ -10515,8 +10518,8 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE } case 1: // nothing for SDT to do - { SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL %s %s \n", - (unsigned long) addr, -1, OptExplanation[OptType], disasm); + { SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL %s %s \n", + (unsigned long long) addr, -1, OptExplanation[OptType], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); break; } @@ -10526,8 +10529,8 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE SDTInstrumentation = true; break; // treat as category 0 } - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL Always1stSrc %s \n", - (unsigned long) addr, -1, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL Always1stSrc %s \n", + (unsigned long long) addr, -1, disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); break; } @@ -10544,8 +10547,8 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE && (this->GetIDAOpcode() != STARS_NN_sbb) #endif ) { // treat as category 1 - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL %s %s \n", - (unsigned long) addr, -1, OptExplanation[OptType], disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL %s %s \n", + (unsigned long long) addr, -1, OptExplanation[OptType], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } else { @@ -10559,15 +10562,15 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE SDTInstrumentation = true; break; // treat as category 0 } - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL AlwaysPTR %s \n", - (unsigned long) addr, -OptType, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL AlwaysPTR %s \n", + (unsigned long long) addr, -OptType, disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); break; } case 8: // Implicitly writes to EDX:EAX, always numeric. - { SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n EDX EAX ZZ %s %s \n", - (unsigned long) addr, -2, OptExplanation[OptType], disasm); + { SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n EDX EAX ZZ %s %s \n", + (unsigned long long) addr, -2, OptExplanation[OptType], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); SDTInstrumentation = true; break; @@ -10582,15 +10585,15 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE SDTInstrumentation = true; break; // treat as category 0 } - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL %s %s \n", - (unsigned long) addr, -1, OptExplanation[OptType], disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL %s %s \n", + (unsigned long long) addr, -1, OptExplanation[OptType], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); break; } case 10: // Implicitly writes to EDX:EAX and ECX, always numeric. - { SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n EDX EAX ECX ZZ %s %s \n", - (unsigned long) addr, -2, OptExplanation[OptType], disasm); + { SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n EDX EAX ECX ZZ %s %s \n", + (unsigned long long) addr, -2, OptExplanation[OptType], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); SDTInstrumentation = true; break; @@ -10618,8 +10621,8 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE break; // treat as category 0 } if ((OptType == 2) || (OptType == 7) || SecondSrcOperandImmNum) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n %s %s %s \n", - (unsigned long) addr, -2, this->DestString(OptType), + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n %s %s %s \n", + (unsigned long long) addr, -2, this->DestString(OptType), OptExplanation[OptType], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } @@ -10643,8 +10646,8 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE // Optimize by informing mmStrata of dead registers. It can avoid saving // and restoring dead state. This is particularly important for EFLAGS, // as restoring the flags is a pipeline serializing instruction. - SMP_fprintf(AnnotFile, "%10lx %6d INSTR DEADREGS ", - (unsigned long) addr, this->GetSize()); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR DEADREGS ", + (unsigned long long) addr, this->GetSize()); this->PrintDeadRegs(AnnotFile); SMP_fprintf(AnnotFile, " %s \n", disasm); } @@ -10653,8 +10656,8 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE if (MemDest && !OrphanCode && ProfInfo->GetMemoryAccessInfo()->ComputeNonDirectAccessRegion(addr, ChildOffset, ChildSize)) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR CHILDACCESS %d %d ZZ %s \n", - (unsigned long) addr, this->GetSize(), ChildOffset, ChildSize, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR CHILDACCESS %d %d ZZ %s \n", + (unsigned long long) addr, this->GetSize(), ChildOffset, ChildSize, disasm); } #endif } @@ -10674,8 +10677,8 @@ void SMPInstr::EmitAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, FILE void SMPInstr::EmitSafeReturn(FILE *AnnotFile) { char *disasm = DisAsmText.GetDisAsm(this->GetAddr()); - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL SafeReturn %s\n", - (unsigned long) this->GetAddr(), -4, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL SafeReturn %s\n", + (unsigned long long) this->GetAddr(), -4, disasm); } // Emit all annotations for the instruction using RTL type inference. @@ -10728,7 +10731,7 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, STARSOpndTypePtr AnnotDefOp = CloneIfNecessary(MemSrcOp, UseFP); // Need to unnormalize stack memory DEFs and USEs before printing annotations. this->MDGetUnnormalizedOp(AnnotDefOp); - SMP_fprintf(InfoAnnotFile, "%10lx %6zu INSTR MEMSRC %zu", (unsigned long) addr, this->GetSize(), SrcBitWidth); + SMP_fprintf(InfoAnnotFile, "%18llx %6zu INSTR MEMSRC %zu", (unsigned long long) addr, this->GetSize(), SrcBitWidth); AnnotPrintOperand(AnnotDefOp, InfoAnnotFile); SMP_fprintf(InfoAnnotFile, " ZZ %s \n", disasm); } @@ -10738,7 +10741,7 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, STARSOpndTypePtr AnnotDefOp = CloneIfNecessary(MemDestOp, UseFP); // Need to unnormalize stack memory DEFs and USEs before printing annotations. this->MDGetUnnormalizedOp(AnnotDefOp); - SMP_fprintf(InfoAnnotFile, "%10lx %6zu INSTR MEMDEF %zu", (unsigned long) addr, this->GetSize(), DestBitWidth); + SMP_fprintf(InfoAnnotFile, "%18llx %6zu INSTR MEMDEF %zu", (unsigned long long) addr, this->GetSize(), DestBitWidth); AnnotPrintOperand(AnnotDefOp, InfoAnnotFile); SMP_fprintf(InfoAnnotFile, " ZZ %s \n", disasm); } @@ -10759,8 +10762,8 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, SMP_fprintf(global_STARS_program->GetAlarmFile(), "ALARM: Call to %s will be disallowed at %lx in %s\n", FuncName.c_str(), (unsigned long) this->GetAddr(), this->GetBlock()->GetFunc()->GetFuncName()); SMP_fprintf(global_STARS_program->GetAlarmFile(), "ALARM REASON: Call policy is DISALLOW for all calls of type %s\n", CallTypeNames[FuncCallType]); - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR SECURITYCALL Disallow 1 1 %s \n", - (unsigned long) addr, this->GetSize(), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR SECURITYCALL Disallow 1 1 %s \n", + (unsigned long long) addr, this->GetSize(), disasm); } } @@ -10777,19 +10780,19 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, if ((1 != TypeGroup) && (14 != TypeGroup) && (!this->MDIsInterruptCall()) && !TypeChange) { if (UnusedMetadata) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL MetadataUnused %s \n", - (unsigned long) addr, -1, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL MetadataUnused %s \n", + (unsigned long long) addr, -1, disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); return; } else if (DEF_METADATA_REDUNDANT == DefMetadataType) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL MetadataRedundant %s \n", - (unsigned long) addr, -1, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL MetadataRedundant %s \n", + (unsigned long long) addr, -1, disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); return; } else if (DEF_METADATA_PROF_REDUNDANT == DefMetadataType) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL MetadataRedundant %s \n", + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL MetadataRedundant %s \n", (unsigned long) addr, -257, disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); // Profiler annotations could be backed off due to false @@ -10814,13 +10817,13 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, // instructions that precede the LocalVarsAllocInstr // (i.e. the PUSHes of callee-saved regs). if ((!AllocSeen || !NeedsFrame) && this->MDIsPushInstr()) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL NoWarn %s \n", - (unsigned long) addr, -3, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL NoWarn %s \n", + (unsigned long long) addr, -3, disasm); NoWarnFlag = true; } else if (this->MDIsPopInstr() && NumericDEFs) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n %s NumericDEFs %s \n", - (unsigned long) addr, ProfiledDEFs ? -256-2 : -2, this->DestString(this->OptType), + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n %s NumericDEFs %s \n", + (unsigned long long) addr, ProfiledDEFs ? -256-2 : -2, this->DestString(this->OptType), disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } @@ -10836,8 +10839,8 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, SDTInstrumentation = true; break; } - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL %s %s \n", - (unsigned long) addr, -1, OptExplanation[this->OptType], disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL %s %s \n", + (unsigned long long) addr, -1, OptExplanation[this->OptType], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); break; @@ -10847,8 +10850,8 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, SDTInstrumentation = true; break; // treat as category 0 } - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL Always1stSrc %s \n", - (unsigned long) addr, -1, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL Always1stSrc %s \n", + (unsigned long long) addr, -1, disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); break; @@ -10867,8 +10870,8 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, #endif ) { // treat as category 1 - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL %s %s \n", - (unsigned long) addr, -1, OptExplanation[this->OptType], disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL %s %s \n", + (unsigned long long) addr, -1, OptExplanation[this->OptType], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } else if (IsEqType(NUMERIC, this->AddSubSourceType) @@ -10878,13 +10881,13 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, && (!CarryBorrow) #endif ) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL 2ndSrcNumeric %s \n", - (unsigned long) addr, -1, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL 2ndSrcNumeric %s \n", + (unsigned long long) addr, -1, disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } else if (NumericDEFs) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n %s NumericDEFs %s \n", - (unsigned long) addr, ProfiledDEFs ? -256-2 : -2, this->DestString(this->OptType), disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n %s NumericDEFs %s \n", + (unsigned long long) addr, ProfiledDEFs ? -256-2 : -2, this->DestString(this->OptType), disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } #if SMP_OPTIMIZE_ADD_TO_NUMERIC @@ -10894,8 +10897,8 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, // means that reg1 will get DEFed to the type of reg2, // whatever it is. If reg2 were known to be NUMERIC, // we would have hit one of the annotation cases above. - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL %s := %s ZZ AddToNumeric %s \n", - (unsigned long) addr, -5, MDGetRegName(this->GetDefUseAddSubOp()), + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL %s := %s ZZ AddToNumeric %s \n", + (unsigned long long) addr, -5, MDGetRegName(this->GetDefUseAddSubOp()), MDGetRegName(this->GetUseOnlyAddSubOp()), disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } @@ -10910,19 +10913,19 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, SDTInstrumentation = true; break; // treat as category 0 } - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL AlwaysPTR %s \n", - (unsigned long) addr, -OptType, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL AlwaysPTR %s \n", + (unsigned long long) addr, -OptType, disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); break; case 8: // Implicitly writes to EDX:EAX, always numeric. if (this->OptType == 10) { // writes to ECX also - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n EDX EAX ECX ZZ %s %s \n", - (unsigned long) addr, -2, OptExplanation[this->OptType], disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n EDX EAX ECX ZZ %s %s \n", + (unsigned long long) addr, -2, OptExplanation[this->OptType], disasm); } else { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n EDX EAX ZZ %s %s \n", - (unsigned long) addr, -2, OptExplanation[this->OptType], disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n EDX EAX ZZ %s %s \n", + (unsigned long long) addr, -2, OptExplanation[this->OptType], disasm); } global_STARS_program->IncrementAnnotationCount(this->OptType); SDTInstrumentation = true; @@ -10933,15 +10936,15 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, SDTInstrumentation = true; #if 0 if (NumericDEFs) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n %s NumericDEFs %s \n", - (unsigned long) addr, ProfiledDEFs ? -256-2 : -2, this->DestString(this->OptType), disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n %s NumericDEFs %s \n", + (unsigned long long) addr, ProfiledDEFs ? -256-2 : -2, this->DestString(this->OptType), disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } #endif } else { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL %s %s \n", - (unsigned long) addr, -1, OptExplanation[this->OptType], disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL %s %s \n", + (unsigned long long) addr, -1, OptExplanation[this->OptType], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } break; @@ -10953,8 +10956,8 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, break; // treat as category 0 } else if (NumericDEFs) { // NUMERIC result because of NUMERIC sources - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n %s NumericDEFs %s \n", - (unsigned long) addr, ProfiledDEFs ? -256-2 : -2, this->DestString(this->OptType), disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n %s NumericDEFs %s \n", + (unsigned long long) addr, ProfiledDEFs ? -256-2 : -2, this->DestString(this->OptType), disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } break; @@ -10966,7 +10969,7 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, break; // treat as category 0 } else if (NumericDEFs) { // NUMERIC result because of NUMERIC sources - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL %s %s \n", (unsigned long) addr, + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL %s %s \n", (unsigned long long) addr, ProfiledDEFs ? -256-1 : -1, OptExplanation[TypeGroup], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } @@ -10982,7 +10985,7 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, break; // treat as category 0 } else { // NUMERIC floating register result; these regs are always NUMERIC - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL %s %s \n", (unsigned long) addr, + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL %s %s \n", (unsigned long long) addr, -1, OptExplanation[TypeGroup], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } @@ -10995,14 +10998,14 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, } if ((OptType == 2) || (OptType == 7) || SecondSrcOperandImmNum) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n %s %s %s \n", - (unsigned long) addr, -2, this->DestString(this->OptType), + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n %s %s %s \n", + (unsigned long long) addr, -2, this->DestString(this->OptType), OptExplanation[this->OptType], disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } else if (NumericDEFs) { // NUMERIC move instruction - SMP_fprintf(AnnotFile, "%10lx %6d INSTR LOCAL n %s NumericDEFs %s \n", - (unsigned long) addr, ProfiledDEFs ? -256-2 : -2, this->DestString(this->OptType), disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR LOCAL n %s NumericDEFs %s \n", + (unsigned long long) addr, ProfiledDEFs ? -256-2 : -2, this->DestString(this->OptType), disasm); global_STARS_program->IncrementAnnotationCount(this->OptType); } break; @@ -11024,8 +11027,8 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, // Optimize by informing mmStrata of dead registers. It can avoid saving // and restoring dead state. This is particularly important for EFLAGS, // as restoring the flags is a pipeline serializing instruction. - SMP_fprintf(AnnotFile, "%10lx %6d INSTR DEADREGS ", - (unsigned long) addr, this->GetSize()); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR DEADREGS ", + (unsigned long long) addr, this->GetSize()); this->PrintDeadRegs(AnnotFile); SMP_fprintf(AnnotFile, " %s \n", disasm); if (IndirJumpAnalyzed && (!this->DeadRegsBitmap[MD_FLAGS_REG])) { @@ -11040,8 +11043,8 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, int ChildOffset, ChildSize; if (MemDest && ProfInfo->GetMemoryAccessInfo()->ComputeNonDirectAccessRegion(addr, ChildOffset, ChildSize)) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR CHILDACCESS %d %d ZZ %s \n", - (unsigned long) addr, this->GetSize(), ChildOffset, ChildSize, disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR CHILDACCESS %d %d ZZ %s \n", + (unsigned long long) addr, this->GetSize(), ChildOffset, ChildSize, disasm); } #if SMP_IDENTIFY_POINTER_ADDRESS_REG // WARNING: This old code was written prior to the normalization of stack operands. @@ -11051,8 +11054,8 @@ void SMPInstr::EmitTypeAnnotations(bool UseFP, bool AllocSeen, bool NeedsFrame, PtrUse = this->GetPointerAddressReg(this->DEFMemOp); if (PtrUse != this->GetLastUse()) { // found POINTER addr reg USE if (PtrUse->GetOp()->GetOpType()->IsRegOp()) { - SMP_fprintf(AnnotFile, "%10lx %6d INSTR POINTER reg %s ZZ %s \n", - (unsigned long) addr, this->GetSize(), MDGetRegName(PtrUse->GetOp()), disasm); + SMP_fprintf(AnnotFile, "%18llx %6d INSTR POINTER reg %s ZZ %s \n", + (unsigned long long) addr, this->GetSize(), MDGetRegName(PtrUse->GetOp()), disasm); } } } @@ -11157,8 +11160,8 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t // the infinite loop annotation. if (this->IsFirstInBlock()) { if (this->GetBlock()->IsInfiniteSelfLoop()) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR INFINITELOOP %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR INFINITELOOP %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), disasm); return; } } @@ -11292,8 +11295,8 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t IdiomCode = 11; } - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu ", - (unsigned long) this->GetAddr(), this->GetSize(), SignednessStrings[DefSignMask], DefBitWidth); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu ", + (unsigned long long) this->GetAddr(), this->GetSize(), SignednessStrings[DefSignMask], DefBitWidth); } else { // must be UnderflowOpcode // (1) Two more benign case to exclude: @@ -11322,8 +11325,8 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t } } } - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK UNDERFLOW %s %zu ", - (unsigned long) this->GetAddr(), this->GetSize(), SignednessStrings[DefSignMask], DefBitWidth); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK UNDERFLOW %s %zu ", + (unsigned long long) this->GetAddr(), this->GetSize(), SignednessStrings[DefSignMask], DefBitWidth); } STARSOpndTypePtr AnnotDefOp = CloneIfNecessary(DefOp, UseFP); if (! DefOp->IsRegOp()) { @@ -11503,16 +11506,16 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t IdiomCode = 33; } if (UnsignedAnnot) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW UNSIGNED %zu %s ZZ", - (unsigned long) this->GetAddr(), this->GetSize(), DefBitWidth, MDGetRegName(DefOp)); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW UNSIGNED %zu %s ZZ", + (unsigned long long) this->GetAddr(), this->GetSize(), DefBitWidth, MDGetRegName(DefOp)); } else if (SignedAnnot) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW SIGNED %zu %s ZZ", - (unsigned long) this->GetAddr(), this->GetSize(), DefBitWidth, MDGetRegName(DefOp)); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW SIGNED %zu %s ZZ", + (unsigned long long) this->GetAddr(), this->GetSize(), DefBitWidth, MDGetRegName(DefOp)); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW UNKNOWNSIGN %zu %s ZZ", - (unsigned long) this->GetAddr(), this->GetSize(), DefBitWidth, MDGetRegName(DefOp)); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW UNKNOWNSIGN %zu %s ZZ", + (unsigned long long) this->GetAddr(), this->GetSize(), DefBitWidth, MDGetRegName(DefOp)); } if (0 < IdiomCode) { SMP_fprintf(InfoAnnotFile, " IDIOM %d CONST %lu %s \n", IdiomCode, (unsigned long) ConstValue, disasm); @@ -11842,8 +11845,8 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t if (DefIsUnsigned || UseIsUnsigned) { // First five cases above: any UNSIGNED operand leads to CHECK TRUNCATION UNSIGNED annotation. if (!SuppressTruncation) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK TRUNCATION UNSIGNED %zu %s %zu %s", - (unsigned long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK TRUNCATION UNSIGNED %zu %s %zu %s", + (unsigned long long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, MDGetRegName(SearchOp), UseBitWidth, MDGetRegName(UseOp)); if (HasSinkString) { SMP_fprintf(InfoAnnotFile, " ZZ %s %s \n", SinkString.c_str(), disasm); @@ -11856,8 +11859,8 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t #endif } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK TRUNCATION UNSIGNED %zu %s %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK TRUNCATION UNSIGNED %zu %s %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, MDGetRegName(SearchOp), UseBitWidth, MDGetRegName(UseOp), TruncationIdiomCode, disasm); } if (UseIsUnsigned && DefIsSigned && !OutArgsWrite && !PartialStore) { @@ -11873,20 +11876,20 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t ; } else if (!SuppressSignednessCheck && (0 == IdiomCode)) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); } } } else if (DefIsSigned && UseIsSigned) { // S => S case above. Emit CHECK TRUNCATION SIGNED annotation. if (!SuppressTruncation) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK TRUNCATION SIGNED %zu %s %zu %s", - (unsigned long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK TRUNCATION SIGNED %zu %s %zu %s", + (unsigned long long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, MDGetRegName(SearchOp), UseBitWidth, MDGetRegName(UseOp)); if (HasSinkString) { SMP_fprintf(InfoAnnotFile, " ZZ %s %s \n", SinkString.c_str(), disasm); @@ -11899,7 +11902,7 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t #endif } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK TRUNCATION SIGNED %zu %s %zu %s ZZ IDIOM %d %s \n", + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK TRUNCATION SIGNED %zu %s %zu %s ZZ IDIOM %d %s \n", (unsigned long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, MDGetRegName(SearchOp), UseBitWidth, MDGetRegName(UseOp), TruncationIdiomCode, disasm); } @@ -11907,8 +11910,8 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t else { // S => ?, ? => S, ? => ? cases above: CHECK TRUNCATION UNKNOWNSIGN annotation. if (!SuppressTruncation) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK TRUNCATION UNKNOWNSIGN %zu %s %zu %s", - (unsigned long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK TRUNCATION UNKNOWNSIGN %zu %s %zu %s", + (unsigned long long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, MDGetRegName(SearchOp), UseBitWidth, MDGetRegName(UseOp)); if (HasSinkString) { SMP_fprintf(InfoAnnotFile, " ZZ %s %s \n", SinkString.c_str(), disasm); @@ -11921,8 +11924,8 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t #endif } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK TRUNCATION UNKNOWNSIGN %zu %s %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK TRUNCATION UNKNOWNSIGN %zu %s %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), SourceDefBitWidth, MDGetRegName(SearchOp), UseBitWidth, MDGetRegName(UseOp), TruncationIdiomCode, disasm); } } @@ -11942,12 +11945,12 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t ; } else if (!SuppressSignednessCheck && (0 == IdiomCode)) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); } } else if (UseIsUnsigned && SourceDefIsSigned) { @@ -11957,12 +11960,12 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t ; } else if (!SuppressSignednessCheck && (0 == IdiomCode)) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); } } else if ((!SourceDefSignMixed) && UseSignMixed) { @@ -11971,13 +11974,13 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t ; } else if (!SuppressSignednessCheck && (0 == IdiomCode)) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS %s %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), SignednessStrings[SourceDefSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS %s %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), SignednessStrings[SourceDefSignMask], UseBitWidth, MDGetRegName(UseOp), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS %s %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), SignednessStrings[SourceDefSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS %s %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), SignednessStrings[SourceDefSignMask], UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); } } @@ -12006,12 +12009,12 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t ; } else if (!SuppressSignednessCheck && (0 == IdiomCode)) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); } } else if (UseIsUnsigned && DefIsSigned) { @@ -12024,12 +12027,12 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t ; } else if (!SuppressSignednessCheck && (0 == IdiomCode)) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); } } else if (UseIsSigned && SourceDefIsUnsigned) { @@ -12037,12 +12040,12 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t ; } else if (!SuppressSignednessCheck && (0 == IdiomCode)) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS UNSIGNED %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); } } else if (UseIsUnsigned && SourceDefIsSigned) { @@ -12052,19 +12055,19 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t ; } else if (!SuppressSignednessCheck && (0 == IdiomCode)) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS SIGNED %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), IdiomCode, disasm); } } #if 0 else if ((!SourceDefSignMixed) && UseSignMixed) { // source DEF has consistent and known signedness, source USE is inconsistent. - SMP_fprintf(InfoAnnotFile, "%10x %6d INSTR CHECK SIGNEDNESS SIGNED %u %s ZZ %s \n", - this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK SIGNEDNESS SIGNED %u %s ZZ %s \n", + (unsigned long long)this->GetAddr(), this->GetSize(), UseBitWidth, MDGetRegName(UseOp), disasm); } #endif #if SMP_MEASURE_NUMERIC_ANNOTATIONS @@ -12120,8 +12123,8 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t UseBitWidth = (DefMaxBitWidth / 2); // USE should have been DEFed with this bit width if (SourceDefBitWidth > UseBitWidth) { // Make checks signed, because of the implications of sign extension by these opcodes. - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK TRUNCATION SIGNED %zu %s %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), DefMaxBitWidth, + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK TRUNCATION SIGNED %zu %s %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), DefMaxBitWidth, MDGetRegName(DefOp), UseBitWidth, MDGetRegName(UseOp), disasm); #if SMP_MEASURE_NUMERIC_ANNOTATIONS ++WidthDoublingTruncationCount; @@ -12145,14 +12148,14 @@ void SMPInstr::EmitIntegerErrorAnnotations(FILE *InfoAnnotFile, list<std::size_t // Must be negative offset from EBP. assert(UseFP); StackOffset -= (int) this->GetBlock()->GetFunc()->GetFramePtrStackDelta(); - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR MEMSET STACKOFFSET_EBP %d SIZE %zu ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), StackOffset, MemSetSize, disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR MEMSET STACKOFFSET_EBP %d SIZE %zu ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), StackOffset, MemSetSize, disasm); } else { // Must be non-negative offset from ESP. StackOffset -= this->GetStackPtrOffset(); - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR MEMSET STACKOFFSET_ESP %d SIZE %zu ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), StackOffset, MemSetSize, disasm); + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR MEMSET STACKOFFSET_ESP %d SIZE %zu ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), StackOffset, MemSetSize, disasm); } } } @@ -12400,19 +12403,19 @@ void SMPInstr::MDEmitLeaOpcodeOverflowAnnotations(FILE *InfoAnnotFile, list<std: CurrString += ScaleStrings[ScaleFactor]; if (IdiomCode > 0) { if (IdiomCode == 18) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[UseSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[UseSignMask], IndexRegMaxWidth, CurrString.c_str(), IdiomCode, PtrString.c_str(), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[UseSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[UseSignMask], IndexRegMaxWidth, CurrString.c_str(), IdiomCode, disasm); } } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[UseSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[UseSignMask], IndexRegMaxWidth, CurrString.c_str(), disasm); } #if SMP_MEASURE_NUMERIC_ANNOTATIONS @@ -12431,19 +12434,19 @@ void SMPInstr::MDEmitLeaOpcodeOverflowAnnotations(FILE *InfoAnnotFile, list<std: CurrString += TempStr; if (IdiomCode > 0) { if (IdiomCode == 18) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), IdiomCode, PtrString.c_str(), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), IdiomCode, disasm); } } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), disasm); } #if SMP_MEASURE_NUMERIC_ANNOTATIONS @@ -12461,19 +12464,19 @@ void SMPInstr::MDEmitLeaOpcodeOverflowAnnotations(FILE *InfoAnnotFile, list<std: CurrString += OffsetString; if (IdiomCode > 0) { if (IdiomCode == 18) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), IdiomCode, PtrString.c_str(), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), IdiomCode, disasm); } } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), disasm); } #if SMP_MEASURE_NUMERIC_ANNOTATIONS @@ -12496,19 +12499,19 @@ void SMPInstr::MDEmitLeaOpcodeOverflowAnnotations(FILE *InfoAnnotFile, list<std: CurrString += MDGetRegName(IndexOp); if (IdiomCode > 0) { if (IdiomCode == 18) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), IdiomCode, PtrString.c_str(), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), IdiomCode, disasm); } } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), disasm); } #if SMP_MEASURE_NUMERIC_ANNOTATIONS @@ -12524,19 +12527,19 @@ void SMPInstr::MDEmitLeaOpcodeOverflowAnnotations(FILE *InfoAnnotFile, list<std: CurrString += OffsetString; if (IdiomCode > 0) { if (IdiomCode == 18) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), IdiomCode, PtrString.c_str(), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), IdiomCode, disasm); } } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), disasm); } #if SMP_MEASURE_NUMERIC_ANNOTATIONS @@ -12559,19 +12562,19 @@ void SMPInstr::MDEmitLeaOpcodeOverflowAnnotations(FILE *InfoAnnotFile, list<std: CurrString += OffsetString; if (IdiomCode > 0) { if (IdiomCode == 18) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), IdiomCode, PtrString.c_str(), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), IdiomCode, disasm); } } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[TempSignMask], TempMaxWidth, CurrString.c_str(), disasm); } #if SMP_MEASURE_NUMERIC_ANNOTATIONS @@ -12601,19 +12604,19 @@ void SMPInstr::MDEmitLeaOpcodeOverflowAnnotations(FILE *InfoAnnotFile, list<std: CurrString += OffsetString; if (IdiomCode > 0) { if (IdiomCode == 18) { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[BaseRegSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[BaseRegSignMask], BaseRegMaxWidth, CurrString.c_str(), IdiomCode, PtrString.c_str(), disasm); } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[BaseRegSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ IDIOM %d %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[BaseRegSignMask], BaseRegMaxWidth, CurrString.c_str(), IdiomCode, disasm); } } else { - SMP_fprintf(InfoAnnotFile, "%10lx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", - (unsigned long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[BaseRegSignMask], + SMP_fprintf(InfoAnnotFile, "%18llx %6d INSTR CHECK OVERFLOW %s %zu %s ZZ %s \n", + (unsigned long long) this->GetAddr(), this->GetSize(), LeaSignednessStrings[BaseRegSignMask], BaseRegMaxWidth, CurrString.c_str(), disasm); } #if SMP_MEASURE_NUMERIC_ANNOTATIONS diff --git a/src/base/SMPProgram.cpp b/src/base/SMPProgram.cpp index b51522f13cdbdc4bc8d29787c74a9633cc60159b..fa6ade6e4666b325819eea1b587508b06b2f0157 100644 --- a/src/base/SMPProgram.cpp +++ b/src/base/SMPProgram.cpp @@ -258,7 +258,7 @@ void SMPProgram::Analyze(ProfilerInformation *pi, FILE *AnnotFile, FILE *InfoAnn SMP_msg("Starting code segment"); if (SegNameSize > 0) SMP_msg(" SegName: %s", SegName); - SMP_msg(" from %lx to %lx\n", (unsigned long) seg->get_startEA(), (unsigned long) seg->get_endEA()); + SMP_msg(" from %llx to %llx\n", (unsigned long long) seg->get_startEA(), (unsigned long long) seg->get_endEA()); #endif } // end if SEG_CODE segment } // end for all segments @@ -290,8 +290,8 @@ void SMPProgram::Analyze(ProfilerInformation *pi, FILE *AnnotFile, FILE *InfoAnn #endif // Check for Unshared fragments that are not really functions. if (this->IsUnsharedFragment(FuncInfo->get_startEA())) { - SMP_msg("INFO: Not creating function for unshared fragment at %lx.\n", - (unsigned long) FuncInfo->get_startEA()); + SMP_msg("INFO: Not creating function for unshared fragment at %llx.\n", + (unsigned long long) FuncInfo->get_startEA()); continue; } @@ -300,8 +300,8 @@ void SMPProgram::Analyze(ProfilerInformation *pi, FILE *AnnotFile, FILE *InfoAnn assert(NULL != CurrFunc); CurrFunc->AnalyzeFunc(); if (CurrFunc->IsFuncEmpty()) { - SMP_msg("INFO: Empty function %s at %lx removed.\n", CurrFunc->GetFuncName(), - (unsigned long) FuncInfo->get_startEA()); + SMP_msg("INFO: Empty function %s at %llx removed.\n", CurrFunc->GetFuncName(), + (unsigned long long) FuncInfo->get_startEA()); delete CurrFunc; } else { @@ -715,14 +715,14 @@ void SMPProgram::EmitDataAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { // No fields within object, or all fields were accessed through indices if (TempGlobal.ReadOnly) { SMP_fprintf(AnnotFile, - "%10x %6zu DATAREF GLOBAL %8lu %llx PARENT %s %s RO\n", - 0, TempGlobal.size, ParentReferentID, (uint64_t) TempGlobal.addr, + "%18llx %6zu DATAREF GLOBAL %8lu %llx PARENT %s %s RO\n", + (unsigned long long)0, TempGlobal.size, ParentReferentID, (unsigned long long) TempGlobal.addr, TempGlobal.name, DataTypes[STARS_get_optype_flags0(TempGlobal.flags) >> 20]); } else { SMP_fprintf(AnnotFile, - "%10x %6zu DATAREF GLOBAL %8lu %llx PARENT %s %s RW\n", - 0, TempGlobal.size, ParentReferentID, (uint64_t) TempGlobal.addr, + "%18llx %6zu DATAREF GLOBAL %8lu %llx PARENT %s %s RW\n", + (unsigned long long)0, TempGlobal.size, ParentReferentID, (unsigned long long) TempGlobal.addr, TempGlobal.name, DataTypes[STARS_get_optype_flags0(TempGlobal.flags) >> 20]); } } @@ -730,14 +730,14 @@ void SMPProgram::EmitDataAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { // Put out annotation for whole struct first if (TempGlobal.ReadOnly) { SMP_fprintf(AnnotFile, - "%10x %6zu DATAREF GLOBAL %8lu %llx PARENT %s %s RO AGGREGATE\n", - 0, TempGlobal.size, ParentReferentID, (uint64_t) TempGlobal.addr, + "%18llx %6zu DATAREF GLOBAL %8lu %llx PARENT %s %s RO AGGREGATE\n", + (unsigned long long)0, TempGlobal.size, ParentReferentID, (unsigned long long) TempGlobal.addr, TempGlobal.name, DataTypes[STARS_get_optype_flags0(TempGlobal.flags) >> 20]); } else { SMP_fprintf(AnnotFile, - "%10x %6zu DATAREF GLOBAL %8lu %llx PARENT %s %s RW AGGREGATE\n", - 0, TempGlobal.size, ParentReferentID, (uint64_t) TempGlobal.addr, + "%18llx %6zu DATAREF GLOBAL %8lu %llx PARENT %s %s RW AGGREGATE\n", + (unsigned long long)0, TempGlobal.size, ParentReferentID, (unsigned long long) TempGlobal.addr, TempGlobal.name, DataTypes[STARS_get_optype_flags0(TempGlobal.flags) >> 20]); } // Now, emit an annotation for each field offset. @@ -756,8 +756,8 @@ void SMPProgram::EmitDataAnnotations(FILE *AnnotFile, FILE *InfoAnnotFile) { FieldSize = TempGlobal.size - CurrOffset.first; } SMP_fprintf(AnnotFile, - "%10x %6zu DATAREF GLOBAL %8lu %llx CHILDOF %lu OFFSET %zu %s + %zu FIELD", - 0, FieldSize, global_STARS_program->GetDataReferentID(), (uint64_t) TempGlobal.addr, ParentReferentID, + "%18llx %6zu DATAREF GLOBAL %8lu %llx CHILDOF %lu OFFSET %zu %s + %zu FIELD", + (unsigned long long)0, FieldSize, global_STARS_program->GetDataReferentID(), (unsigned long long) TempGlobal.addr, ParentReferentID, CurrOffset.first, TempGlobal.name, CurrOffset.first); if (CurrOffset.second) { // indexed accesses to this field SMP_fprintf(AnnotFile, " INDEXED\n"); @@ -958,7 +958,7 @@ void SMPProgram::ProcessExceptionHandlingFileSections(void) { if (1 == ReadCount) { // success SMPFunction *EHFunc = this->FindFunction(ExceptionFuncAddr); if (NULL == EHFunc) { - SMP_msg("SERIOUS WARNING: Could not find function at eh_frame address %lx\n", (unsigned long) ExceptionFuncAddr); + SMP_msg("SERIOUS WARNING: Could not find function at eh_frame address %llx\n", (unsigned long long) ExceptionFuncAddr); } else { EHFunc->SetUnsafeForFastReturns(true, EH_FRAME_ENTRY); @@ -979,7 +979,7 @@ void SMPProgram::ResetFuncsProcessed(void) { for (MapIter = this->FuncMap.begin(); MapIter != this->FuncMap.end(); ++MapIter) { CurrFunc = MapIter->second; if (NULL == CurrFunc) { - SMP_msg("ERROR: NULL Func ptr in FuncMap for %lx\n", (unsigned long) MapIter->first); + SMP_msg("ERROR: NULL Func ptr in FuncMap for %llx\n", (unsigned long long) MapIter->first); continue; } CurrFunc->SetFuncProcessed(false);