@Override
	public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log)
			throws CancelledException {

		if (!o7CallReturnAnalysis) {
			return true;
		}
		
		AddressSet unanalyzedSet = new AddressSet(set);
		
		Register linkReg = program.getLanguage().getRegister("o7");
		
		InstructionIterator instructions = program.getListing().getInstructions(unanalyzedSet, true);
		for (Instruction instr : instructions) {
			if (!instr.getFlowType().isCall()) {
				continue;
			}
			if (!instr.hasFallthrough()) {
				continue;
			}
			
			PcodeOp[] pcode = instr.getPcode();
			for (PcodeOp pcodeOp : pcode) {
				Varnode output = pcodeOp.getOutput();
				if (output == null || !output.getAddress().equals(linkReg.getAddress())) {
					continue;
				}
				Varnode input = pcodeOp.getInput(0);
				if (input.isConstant()) {
					continue; // this is just assigning the return value after the call
				}
				//instr.setFallThrough(null);
				instr.setFlowOverride(FlowOverride.CALL_RETURN);
				break;
			}
		}

		return true;
	}
The early Sparc analyzer catches instructions with sets of the o7 link
address register to a value other than right after the function
Ghidra/Processors/Sparc/src/main/java/ghidra/app/plugin/core/analysis/SparcEarlyAddressAnalyzer.java