void spvPushOperandTypesForMask(const spv_operand_table operandTable, const spv_operand_type_t type, const uint32_t mask, spv_operand_pattern_t* pattern) { // Scan from highest bits to lowest bits because we will append in LIFO // fashion, and we need the operands for lower order bits to be consumed first for (uint32_t candidate_bit = (1u << 31u); candidate_bit; candidate_bit >>= 1) { if (candidate_bit & mask) { spv_operand_desc entry = nullptr; if (SPV_SUCCESS == spvOperandTableValueLookup(operandTable, type, candidate_bit, &entry)) { spvPushOperandTypes(entry->operandTypes, pattern); } } } }
spv_result_t AssemblyGrammar::lookupOperand(spv_operand_type_t type, uint32_t operand, spv_operand_desc* desc) const { return spvOperandTableValueLookup(operandTable_, type, operand, desc); }