@Override
	public void setRegisterValue(Address start, Address end, RegisterValue value)
			throws ContextChangeException {
		if (value == null) {
			throw new IllegalArgumentException("Value cannot be null, use remove() instead!");
		}
		Register baseRegister = value.getRegister().getBaseRegister();
		RegisterValueStore store = registerValueMap.get(baseRegister);
		if (store == null) {
			RangeMapAdapter adapter = createNewRangeMapAdapter(baseRegister);
			store = createRegisterValueStore(baseRegister, adapter);
		}
		store.setValue(start, end, value);
		if (registersWithValues != null && !registersWithValues.contains(baseRegister)) {
			addRegisterWithValue(baseRegister);
		}
	}
Flush any cached context not yet written to database
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/AbstractStoredProgramContext.java