| 2968 | } |
| 2969 | |
| 2970 | spv_result_t ValidateInt32Operand(ValidationState_t& _, const Instruction* inst, |
| 2971 | uint32_t operand_index, |
| 2972 | const char* opcode_name, |
| 2973 | const char* operand_name) { |
| 2974 | const auto type_id = |
| 2975 | _.FindDef(inst->GetOperandAs<uint32_t>(operand_index))->type_id(); |
| 2976 | if (!_.IsIntScalarType(type_id, 32)) { |
| 2977 | return _.diag(SPV_ERROR_INVALID_ID, inst) |
| 2978 | << opcode_name << " " << operand_name << " type <id> " |
| 2979 | << _.getIdName(type_id) << " is not a 32 bit integer."; |
| 2980 | } |
| 2981 | return SPV_SUCCESS; |
| 2982 | } |
| 2983 | |
| 2984 | spv_result_t ValidateInt32Or64Operand(ValidationState_t& _, |
| 2985 | const Instruction* inst, |
no test coverage detected