59 instructionBoundaries_(toCopy.instructionBoundaries_),
60 instructionAddresses_(toCopy.instructionAddresses_) {
63 for (ReferenceMap::const_iterator iter = toCopy.
references_.begin();
68 for (IndexBoundSet::const_iterator iter =
indexBounds->begin();
72 newSet->insert(newTable);
78 std::pair<const Instruction*, IndexBoundSet*>(
79 instruction, newSet));
103 for (ReferenceMap::const_iterator iter = bits.
references_.begin();
111 std::pair<const Instruction*, IndexBoundSet*>(
112 instruction, newSet));
114 IndexBoundSet* oldSet = MapTools::valueForKey<IndexBoundSet*>(
123 for (ReferenceMap::const_iterator iter = bits.
references_.begin();
128 for (IndexBoundSet::const_iterator setIter =
129 indexBoundSet->begin();
130 setIter != indexBoundSet->end(); setIter++) {
134 MapTools::valueForKey<unsigned int>(
140 insert(end(), bitsCopy.begin(), bitsCopy.end());
166 setForInstruction.insert(newTable);
202 std::pair<const Instruction*, unsigned int>(&instruction, address));
207 for (IndexBoundSet::const_iterator iter = setForInstruction.begin();
208 iter != setForInstruction.end(); iter++) {
233 if (*iter > position) {
236 }
else if (*iter == position) {
271 const string procName =
"InstructionBitVector::instructionBoundary";
272 throw OutOfRange(__FILE__, __LINE__, procName);
289 std::pair<const Instruction*, IndexBoundSet*> newPair(
290 &instruction, newSet);
294 return *MapTools::valueForKey<IndexBoundSet*>(
312 for (IndexBoundSet::const_iterator iter = from.begin();
313 iter != from.end(); iter++) {
318 for (IndexBoundTable::iterator iter = newTable->begin();
319 iter != newTable->end(); iter++) {
320 (*iter).incrStartIndex(size());
321 (*iter).incrEndIndex(size());
343 string errorMsg =
"Unable to fix instruction reference with the "
344 "correct instruction address due to insuffient space reserved "
345 "for the immediate.";
350 int stopBit = requiredSize;
352 for (IndexBoundTable::const_reverse_iterator iter = indexes.rbegin();
353 iter != indexes.rend(); iter++) {
360 if ((*iter).isLimmEncoded()) {
368 for (
unsigned int index = endIndex; index >= startIndex; index--) {
370 if (currentBit <= stopBit) {
373 operator[](index) =
false;
389 unsigned int size(0);
390 for (IndexBoundTable::const_iterator iter = indexes.begin();
391 iter != indexes.end(); iter++) {
392 size += (*iter).slotEndIndex() - (*iter).slotStartIndex() + 1;