public static Address getEndOfDelaySlots(Instruction instr) {
		Listing listing = instr.getProgram().getListing();
		Address maxAddr = instr.getMaxAddress();
		try {
			Instruction nextInstr = listing.getInstructionAt(maxAddr.addNoWrap(1));
			while (nextInstr != null && nextInstr.isInDelaySlot()) {
				maxAddr = nextInstr.getMaxAddress();
				nextInstr = listing.getInstructionAt(maxAddr.addNoWrap(1));
			}
		}
		catch (AddressOverflowException e) {
			// ignore
		}
		return maxAddr;
	}
If the specified instruction is contained within a delay slot, or has delay slots,
the maximum address of the last delay slot instruction will be returned.
If a normal instruction is specified the instructions maximum address is returned.
@param instr
@return maximum address of instruction or its last delay slot
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/SimpleDiffUtility.java