private void setProcessorContext() {
		// this assumes you have set the emulation address
		//   the emu will have cleared the context for the new address
		RegisterValue contextRegisterValue = emulator.getContextRegisterValue();
		if (contextRegisterValue != null) {
			return;
		}

		Address executeAddress = emulator.getExecuteAddress();
		Instruction instructionAt = program.getListing().getInstructionAt(executeAddress);
		if (instructionAt != null) {
			RegisterValue disassemblyContext =
				instructionAt.getRegisterValue(instructionAt.getBaseContextRegister());
			emulator.setContextRegisterValue(disassemblyContext);
		}
	}
Used when the emulator has had the execution address changed to make sure it has a context
consistent with the program context if there is one.
Ghidra/Framework/Emulation/src/main/java/ghidra/app/emulator/EmulatorHelper.java