Lines Matching refs:instruction
66 const spv_parsed_instruction_t& instruction,
69 assert(instruction.opcode == spv::Op::OpString);
70 if (instruction.num_operands != 2) {
76 const auto& operand = instruction.operands[1];
78 reinterpret_cast<const char*>(instruction.words + operand.offset);
80 instruction.words + operand.offset + operand.num_words);
85 const spv_position_t& loc, const spv_parsed_instruction_t& instruction,
88 assert(instruction.opcode == spv::Op::OpSourceContinued);
89 if (instruction.num_operands != 1) {
95 const auto& operand = instruction.operands[0];
97 reinterpret_cast<const char*>(instruction.words + operand.offset);
99 instruction.words + operand.offset + operand.num_words);
104 const spv_parsed_instruction_t& instruction,
107 assert(instruction.opcode == spv::Op::OpSource);
109 if (instruction.num_words < 3) {
117 if (instruction.num_words < 4) {
120 *filename = instruction.words[3];
122 if (instruction.num_words < 5) {
127 reinterpret_cast<const char*>(instruction.words + 4);
129 reinterpret_cast<const char*>(instruction.words + instruction.num_words);
154 &instructionIndex](const spv_parsed_instruction_t& instruction) {
158 if (instruction.opcode == spv::Op::OpString) {
160 result = extractOpString(loc, instruction, &content);
162 stringMap.emplace(instruction.result_id, std::move(content));
164 } else if (instruction.opcode == spv::Op::OpSource) {
167 result = extractOpSource(loc, instruction, &filenameId, &code);
171 } else if (instruction.opcode == spv::Op::OpSourceContinued) {
179 result = extractOpSourceContinued(loc, instruction,
184 lastOpcode = static_cast<spv::Op>(instruction.opcode);