| 71 | } |
| 72 | |
| 73 | void spvInstructionCopy(const uint32_t* words, const spv::Op opcode, |
| 74 | const uint16_t wordCount, const spv_endianness_t endian, |
| 75 | spv_instruction_t* pInst) { |
| 76 | pInst->opcode = opcode; |
| 77 | pInst->words.resize(wordCount); |
| 78 | for (uint16_t wordIndex = 0; wordIndex < wordCount; ++wordIndex) { |
| 79 | pInst->words[wordIndex] = spvFixWord(words[wordIndex], endian); |
| 80 | if (!wordIndex) { |
| 81 | uint16_t thisWordCount; |
| 82 | uint16_t thisOpcode; |
| 83 | spvOpcodeSplit(pInst->words[wordIndex], &thisWordCount, &thisOpcode); |
| 84 | assert(opcode == static_cast<spv::Op>(thisOpcode) && |
| 85 | wordCount == thisWordCount && "Endianness failed!"); |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | const char* spvOpcodeString(const uint32_t opcode) { |
| 91 | const spvtools::InstructionDesc* desc = nullptr; |
nothing calls this directly
no test coverage detected