private void _preValidateCurrentOp() throws DWARFExpressionException {
		// throw a DWARFExpressionException if op not valid in this context
		int opcode = currentOp.getOpCode();
		boolean isLastOperation = (currentOpIndex == expr.getLastActiveOpIndex());

		switch (opcode) {
			case DW_OP_fbreg:
				if (frameOffset == -1) {
					throw new DWARFExpressionException(
						"Frame base has not been set, DW_OP_fbreg can not be evaluated");
				}
				break;
			case DW_OP_deref:
				if (!(registerLoc || lastStackRelative)) {
					throw new DWARFExpressionException(
						"Can not evaluate DW_OP_deref for non-register location");
				}
				if (!isLastOperation) {
					throw new DWARFExpressionException(
						"Non-terminal DW_OP_deref can't be evaluated");
				}

				break;
			default:
				if (((opcode >= DW_OP_reg0 && opcode <= DW_OP_reg31) || (opcode == DW_OP_regx)) &&
					(!isLastOperation)) {
					throw new DWARFExpressionException(
						"Non-terminal DW_OP_reg? can't be evaluated");
				}
		}

	}
@param _expr
@param stackArgs - pushed 0..N, so stackArgs[0] will be deepest, stackArgs[N] will be topmost.
@return
@throws DWARFExpressionException
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/expression/DWARFExpressionEvaluator.java