private byte[] buildOperandMask(int opIndex) {
		byte[] mask = new byte[instructionMask.length];
//		DumbMemBufferImpl buf = new DumbMemBufferImpl(program.getMemory(), start);
		OperandSymbol sym = prototype.getOperandSymbol(opIndex, buf, context);
		if (sym == null) {
			return mask;
		}
		ConstructState mnemonicState = prototype.getMnemonicState();
		combineOperandMask(mnemonicState, sym, mask);

		boolean emptyMask = true;
		for (byte element : mask) {
			if (element != 0) {
				emptyMask = false;
				break;
			}
		}

		if (emptyMask) {
			// attempt to steal operand symbol pattern bits from instruction mask
			// if operand value bits not identified above
			PatternGroup symGroup = mainSubGroups.get(sym.getName());
			if (symGroup != null) {
				mask = symGroup.getMask(mask.length);
			}
		}

		return mask;
	}
Add instruction context pattern to the current pattern group.
@param maskvalue pattern mask/value
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/processors/sleigh/SleighDebugLogger.java