private void addFunctionStartDisassemblyPoint(Address functionAddr, String functionName,
			AddressSet disassembleStarts, Program program) {

		Symbol s = program.getSymbolTable().getPrimarySymbol(functionAddr);
		if (s == null || s.isDynamic() ||
			s.getName().equals(SymbolUtilities.getDefaultFunctionName(functionAddr))) {
			createSymbol(functionAddr, functionName, program);
		}

		Listing listing = program.getListing();

		CodeUnit cu = listing.getCodeUnitAt(functionAddr);
		if (cu instanceof Instruction) {
			return;
		}
		if (cu == null || ((Data) cu).isDefined()) {
			Msg.warn(this, "Unexpected code unit or bad test-group function pointer: " +
				functionName + " at " + functionAddr);
		}

		String processor = program.getLanguage().getProcessor().toString();

		if ("ARM".equals(processor)) {
			Register tReg = program.getRegister("T");
			long offset = functionAddr.getOffset();
			if (tReg != null && (offset & 1) == 1) {
				RegisterValue thumbMode = new RegisterValue(tReg, BigInteger.ONE);
				try {
					program.getProgramContext()
							.setRegisterValue(functionAddr, functionAddr, thumbMode);
				}
				catch (ContextChangeException e) {
					throw new AssertException(e);
				}
			}
		}
		else if ("MIPS".equals(processor)) {
			Register isaModeReg = program.getRegister("ISA_MODE");
			long offset = functionAddr.getOffset();
			if (isaModeReg != null && (offset & 1) == 1) {
				RegisterValue thumbMode = new RegisterValue(isaModeReg, BigInteger.ONE);
				try {
					program.getProgramContext()
							.setRegisterValue(functionAddr, functionAddr, thumbMode);
				}
				catch (ContextChangeException e) {
					throw new AssertException(e);
				}
			}
		}

		functionAddr = alignAddress(functionAddr, program.getLanguage().getInstructionAlignment());

		disassembleStarts.add(functionAddr);
	}
Invoked for non-gzf files to perform auto-analysis.
NOTE: This method will only be invoked once during the first test setup
for all test binaries found.  This method will not be invoked
during subsequent tests since the analyzed program will be cached.
@param program
@throws Exception
Ghidra/Features/Base/src/main/java/ghidra/test/processors/support/ProcessorEmulatorTestAdapter.java