private InstructionMetadata createInstructionMetadata(PseudoInstruction instruction)
			throws MemoryAccessException {

		// The mask array we can get directly from the prototype. For the value array we
		// have to figure out which bits pertain to operands and just zero them out, so we're
		// just left with the instruction (mnemonic) bits.
		InstructionPrototype prototype = instruction.getPrototype();
		byte[] mask = prototype.getInstructionMask().getBytes();
		byte[] value = instruction.getParsedBytes();
		value = clearOperandBits(mask, value);
		MaskContainer mnemonicMask = new MaskContainer(mask, value);

		InstructionMetadata instructionMD = new InstructionMetadata(mnemonicMask);
		instructionMD.setIsInstruction(true);
		instructionMD.setTextRep(instruction.getMnemonicString());

		return instructionMD;
	}
Creates a {@link InstructionMetadata} object for the instruction
provided.

@param instruction the instruction to parse
@return the instruction metadata
@throws MemoryAccessException if there is an exception getting instruction bytes
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/ui/InsertBytesWidget.java