private void reconcileModifiedRegisters() {
		if (busy) {
			throw new IllegalStateException(
				"ResultsState.getPreservedRegisters and ResultsState.getModifiedRegisters may not be invoked during instantiation");
		}
		registersPreserved = new ArrayList<Register>();
		for (Register reg : registersModified) {
			if (isPreserved(reg)) {
				registersPreserved.add(reg);
			}
		}
		registersModified.removeAll(registersPreserved);
	}
Returns the set of registers which were modified
Ghidra/Features/Base/src/main/java/ghidra/util/state/ResultsState.java