private void addRegisterDiffDetails(ProgramContext pc1, ProgramContext pc2, Register reg1)
			throws ConcurrentModificationException {
		String name = reg1.getName();
		Register reg2 = pc2.getRegister(name);

		AddressRangeIterator p1AddressRangeIter = checkP1AddressSet.getAddressRanges();
		while (p1AddressRangeIter.hasNext()) {
			AddressRange p1Range = p1AddressRangeIter.next();
			Address min1 = p1Range.getMinAddress();
			Address max1 = p1Range.getMaxAddress();
			Address min2 = SimpleDiffUtility.getCompatibleAddress(p1, min1, p2);
			Address max2 = SimpleDiffUtility.getCompatibleAddress(p1, max1, p2);

			AddressRangeIterator it1 = pc1.getRegisterValueAddressRanges(reg1, min1, max1); // Can throw ConcurrentModificationException
			AddressRangeIterator it2 = pc2.getRegisterValueAddressRanges(reg2, min2, max2); // Can throw ConcurrentModificationException

			// CombinedAddressRangeIterator only works for iterators from the same program.
			// So convert the program2 iterator to a program1 iterator and pass it to the constructor.
			AddressRangeIteratorConverter convertedIt2 = new AddressRangeIteratorConverter(it2, p1);
			AddressRangeIterator p1CombinedIterator =
				new CombinedAddressRangeIterator(it1, convertedIt2);

			while (p1CombinedIterator.hasNext()) {
				AddressRange addrRange1 = p1CombinedIterator.next();
				Address rangeMin1 = addrRange1.getMinAddress();
				Address rangeMax1 = addrRange1.getMaxAddress();
				Address rangeMin2 = SimpleDiffUtility.getCompatibleAddress(p1, rangeMin1, p2);
				BigInteger value1 = pc1.getValue(reg1, rangeMin1, false);
				BigInteger value2 = pc2.getValue(reg2, rangeMin2, false);
				boolean sameValue = (value1 == null) ? (value2 == null) : value1.equals(value2);
				if (!sameValue) {
					if (!hasProgramContextDiffs) {
						addDiffHeader("Program Context");
						addDisplayRegValues(null, rangeMin1, rangeMax1, value1, value2);
						hasProgramContextDiffs = true;
					}
					addDisplayRegValues(reg1, rangeMin1, rangeMax1, value1, value2);
				}
			}
		}
	}
Adds the Diff Details for the indicated register to the details document.
@param pc1 first program's register context
@param pc2 second program's register context
@param reg1 the register
@throws ConcurrentModificationException if analysis is modifying the program context.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramDiffDetails.java