Lines Matching defs:inst

66 std::string spvDecodeLiteralStringOperand(const spv_parsed_instruction_t& inst,
68 assert(operand_index < inst.num_operands);
69 const spv_parsed_operand_t& operand = inst.operands[operand_index];
71 return spvtools::utils::MakeString(inst.words + operand.offset,
117 // expected_operands parameter, and the scalar members of the inst parameter.
121 spv_result_t parseOperand(size_t inst_offset, spv_parsed_instruction_t* inst,
139 const spv_parsed_instruction_t* inst);
298 spv_parsed_instruction_t inst = {};
308 // After a successful parse of the instruction, the inst.operands member
315 spvOpcodeSplit(first_word, &inst_word_count, &inst.opcode);
321 if (grammar_.lookupOpcode(static_cast<spv::Op>(inst.opcode), &opcode_desc))
322 return diagnostic() << "Invalid opcode: " << inst.opcode;
356 parseOperand(inst_offset, &inst, type, &_.endian_converted_words,
388 recordNumberType(inst_offset, &inst);
393 inst.words = _.endian_converted_words.data();
397 inst.words = _.words + inst_offset;
399 inst.num_words = inst_word_count;
403 inst.operands = _.operands.data();
404 inst.num_operands = uint16_t(_.operands.size());
406 // Issue the callback. The callee should know that all the storage in inst
409 if (auto error = parsed_instruction_fn_(user_data_, &inst)) return error;
416 spv_parsed_instruction_t* inst,
421 const spv::Op opcode = static_cast<spv::Op>(inst->opcode);
451 inst->type_id = word;
457 inst->result_id = word;
460 if (_.id_to_type_id.find(inst->result_id) != _.id_to_type_id.end())
462 << "Id " << inst->result_id << " is defined more than once";
467 _.id_to_type_id[inst->result_id] =
468 spvOpcodeGeneratesType(opcode) ? inst->result_id : inst->type_id;
485 inst->ext_inst_type = ext_inst_type_iter->second;
498 assert(inst->ext_inst_type != SPV_EXT_INST_TYPE_NONE);
500 if (grammar_.lookupExtInst(inst->ext_inst_type, word, &ext_inst) ==
502 // if we know about this ext inst, push the expected operands
507 if (!spvExtInstIsNonSemantic(inst->ext_inst_type)) {
589 assert(inst->type_id);
591 setNumericTypeInfoForType(&parsed_operand, inst->type_id))
630 assert(inst->result_id);
631 _.import_id_to_ext_inst_type[inst->result_id] = ext_inst_type;
817 const spv_parsed_instruction_t* inst) {
818 const spv::Op opcode = static_cast<spv::Op>(inst->opcode);
830 _.type_id_to_number_type_info[inst->result_id] = info;