private String[] getAutoPostComment(CodeUnit cu) {

		if (!(cu instanceof Instruction)) {
			return null;
		}
		Instruction instr = (Instruction) cu;
		LinkedList<String> comments = new LinkedList<>();

		if (instr.isInDelaySlot()) {
			// ensure that auto-comment come from parent and are only placed after last
			// delay slot.  Switch out inst with the parent instruction
			int delaySlotPosition = 0;
			while (instr.isInDelaySlot()) {
				++delaySlotPosition;
				instr = instr.getPrevious();
			}
			if (instr.getDelaySlotDepth() != delaySlotPosition) {
				return null; // not the last delay slot
			}
		}

		if (instr.isLengthOverridden() || instr.isFallThroughOverridden()) {
			Address fallThrough = instr.getFallThrough();
			String fallthroughComment =
				"-- Fallthrough" + (instr.isFallThroughOverridden() ? " Override" : "") + ": " +
					(fallThrough != null ? fallThrough.toString() : "NO-FALLTHROUGH");
			comments.addFirst(fallthroughComment);
		}

		if (instr.isLengthOverridden()) {
			String lengthOverrideComment = "-- Length Override: " + instr.getLength() +
				" (actual length is " + instr.getParsedLength() + ")";
			comments.addFirst(lengthOverrideComment);
		}

		FlowOverride flowOverride = instr.getFlowOverride();
		if (flowOverride != FlowOverride.NONE) {
			String flowOverrideComment =
				"-- Flow Override: " + flowOverride + " (" + instr.getFlowType().getName() + ")";
			comments.addFirst(flowOverrideComment);
		}

		InstructionPcodeOverride pCodeOverride = new InstructionPcodeOverride(instr);

		if (pCodeOverride.hasPotentialOverride()) {
			PcodeOp[] pcodeOps = instr.getPcode();
			OverrideCommentData overrideData = null;
			if (pCodeOverride.getPrimaryCallReference() == null) {
				overrideData = getOverrideCommentData(instr, RefType.CALL_OVERRIDE_UNCONDITIONAL,
					pcodeOps, pCodeOverride);
				if (overrideData != null) {
					String callOverrideComment =
						"-- Call Destination Override: " + getOverridingCommentDestString(
							overrideData.getOverridingRef(), instr.getProgram());
					comments.addFirst(callOverrideComment);
				}
			}
			overrideData = getOverrideCommentData(instr, RefType.JUMP_OVERRIDE_UNCONDITIONAL,
				pcodeOps, pCodeOverride);
			if (overrideData != null) {
				String jumpOverrideComment =
					"-- Jump Destination Override: " + getOverridingCommentDestString(
						overrideData.getOverridingRef(), instr.getProgram());
				comments.addFirst(jumpOverrideComment);
			}
			overrideData = getOverrideCommentData(instr, RefType.CALLOTHER_OVERRIDE_CALL, pcodeOps,
				pCodeOverride);
			if (overrideData != null) {
				String callOtherCallOverrideComment =
					"-- CALLOTHER(" + overrideData.getOverriddenCallOther() + ") Call Override: " +
						getOverridingCommentDestString(overrideData.getOverridingRef(),
							instr.getProgram());
				if (overrideData.hasMultipleCallOthers()) {
					comments.addFirst("-- WARNING: additional CALLOTHER ops present");
				}
				String outputWarningString = overrideData.getOutputWarningString();
				if (outputWarningString != null) {
					comments.addFirst(outputWarningString);
				}
				else {
					comments.addFirst(callOtherCallOverrideComment);
				}
			}
			else {
				overrideData = getOverrideCommentData(instr, RefType.CALLOTHER_OVERRIDE_JUMP,
					pcodeOps, pCodeOverride);
				if (overrideData != null) {
					String callOtherJumpOverrideComment =
						"-- CALLOTHER(" + overrideData.getOverriddenCallOther() +
							") Jump Override: " + getOverridingCommentDestString(
								overrideData.getOverridingRef(), instr.getProgram());
					if (overrideData.hasMultipleCallOthers()) {
						comments.addFirst("-- WARNING: additional CALLOTHER ops present");
					}
					String outputWarningString = overrideData.getOutputWarningString();
					if (outputWarningString != null) {
						comments.addFirst(outputWarningString);
					}
					else {
						comments.addFirst(callOtherJumpOverrideComment);
					}
				}
			}
		}
		if (comments.size() > 0) {
			return comments.toArray(new String[0]);
		}
		return null;
	}
@see ghidra.app.util.viewer.field.FieldFactory#getField(ProxyObj, int)
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/PostCommentFieldFactory.java