@Override
	public void postExecuteCallback(Emulate emulate, Address lastExecuteAddress,
			PcodeOp[] lastExecutePcode, int lastPcodeIndex, Address currentAddress)
			throws LowlevelError {
		if (ismReg == null) {
			return;
		}
		if (lastPcodeIndex < 0) {
			// ignore fall-through condition
			return;
		}
		int lastOp = lastExecutePcode[lastPcodeIndex].getOpcode();
		if (lastOp != PcodeOp.BRANCH && lastOp != PcodeOp.CBRANCH && lastOp != PcodeOp.BRANCHIND &&
			lastOp != PcodeOp.CALL && lastOp != PcodeOp.CALLIND && lastOp != PcodeOp.RETURN) {
			// only concerned with Branch, Call or Return ops
			return;
		}
		long tbValue = emu.getMemoryState().getValue(ismReg);
		if (tbValue == 1) {
			// Thumb mode
			emu.setContextRegisterValue(ISA_MODE1); // change context to be consistent with ISM value
			if ((currentAddress.getOffset() & 0x1) == 1) {
				emulate.setExecuteAddress(currentAddress.previous());
			}
		}
		else {

			if ((currentAddress.getOffset() & 0x1) == 1) {
				throw new LowlevelError(
					"Flow to odd address occurred without setting ISM register (16-bit mode)");
			}

			// MIPS mode
			emu.setContextRegisterValue(ISA_MODE0); // change context to be consistent with ISM value
		}
	}
Use ISM register value to establish ISA_MODE when branching/calling. If
ISM = 0, check for odd destination address which may occur when
jumping/returning indirectly to Thumb mode. It is assumed that language
will properly handle context changes during the flow of execution, we
need only fix the current program counter.
Ghidra/Processors/MIPS/src/main/java/ghidra/program/emulation/MIPSEmulateInstructionStateModifier.java