diff --git a/SMPDataFlowAnalysis.cpp b/SMPDataFlowAnalysis.cpp index 5cd461049f013631d646e9962bd25283dc907dd8..744b158db49ba681a1346047635a213e2743e421 100644 --- a/SMPDataFlowAnalysis.cpp +++ b/SMPDataFlowAnalysis.cpp @@ -1228,7 +1228,7 @@ void SMPPhiFunction::Dump(void) const { SMPDefUseChain::SMPDefUseChain(void) { this->SSAName.type = o_void; this->RefInstrs.clear(); - this->RefInstrs.push_back(BADADDR); + this->RefInstrs.push_back((unsigned short) BADADDR); this->IndWrite = false; return; } @@ -1253,13 +1253,13 @@ void SMPDefUseChain::SetName(op_t Name) { // Set the DEF instruction. void SMPDefUseChain::SetDef(ea_t Def) { - this->RefInstrs[0] = Def; + this->RefInstrs[0] = (unsigned short) Def; return; } // Push a USE onto the list void SMPDefUseChain::PushUse(ea_t Use) { - this->RefInstrs.push_back(Use); + this->RefInstrs.push_back((unsigned short) Use); return; } diff --git a/SMPDataFlowAnalysis.h b/SMPDataFlowAnalysis.h index 91906e9df2ea4135d6e286a82b1a6d76d006a3c5..4a25e90134f2fa65cef09f1145eeb65ef1b6efe2 100644 --- a/SMPDataFlowAnalysis.h +++ b/SMPDataFlowAnalysis.h @@ -532,7 +532,12 @@ public: private: op_t SSAName; // What variable is defined and used in the chain? bool IndWrite; // Does an indirect memory write occur within the chain? - vector<ea_t> RefInstrs; // First is always DEF, rest are USE. + // Keep DEF and USE addrs as unsigned short offsets from BaseAddr of block. + // The BaseAddr of the block is 1 less than the first inst addr of the block, + // so that this value can be used as a flag to indicate that the value was + // live-in and upward-exposed upon block entry and does not have a real DEF + // in the block for that SSANum. + vector<unsigned short> RefInstrs; // First is always DEF, rest are USE. }; // end class SMPDefUseChain class SMPDUChainArray {