Silence unhandled case warns (#823)
Some checks are pending
Reuse / reuse (push) Waiting to run
Clang Format / clang-format (push) Waiting to run
Linux-Qt / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS-Qt / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows-Qt / build (push) Waiting to run
Windows / build (push) Waiting to run

This commit is contained in:
illusion0001 2024-09-12 15:01:13 -05:00 committed by GitHub
parent a49c7e9dcb
commit b911c70d35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 0 deletions

View file

@ -162,6 +162,8 @@ uint32_t GcnDecodeContext::getEncodingLength(InstEncoding encoding) {
case InstEncoding::EXP: case InstEncoding::EXP:
instLength = sizeof(uint64_t); instLength = sizeof(uint64_t);
break; break;
default:
break;
} }
return instLength; return instLength;
} }
@ -217,6 +219,8 @@ uint32_t GcnDecodeContext::getOpMapOffset(InstEncoding encoding) {
case InstEncoding::VOP2: case InstEncoding::VOP2:
offset = (uint32_t)OpcodeMap::OP_MAP_VOP2; offset = (uint32_t)OpcodeMap::OP_MAP_VOP2;
break; break;
default:
break;
} }
return offset; return offset;
} }
@ -311,6 +315,8 @@ void GcnDecodeContext::repairOperandType() {
case Opcode::IMAGE_GATHER4_C: case Opcode::IMAGE_GATHER4_C:
m_instruction.src[0].type = ScalarType::Any; m_instruction.src[0].type = ScalarType::Any;
break; break;
default:
break;
} }
} }
@ -363,6 +369,8 @@ void GcnDecodeContext::decodeInstruction32(InstEncoding encoding, GcnCodeSlice&
case InstEncoding::VINTRP: case InstEncoding::VINTRP:
decodeInstructionVINTRP(hexInstruction); decodeInstructionVINTRP(hexInstruction);
break; break;
default:
break;
} }
} }
@ -387,6 +395,8 @@ void GcnDecodeContext::decodeInstruction64(InstEncoding encoding, GcnCodeSlice&
case InstEncoding::EXP: case InstEncoding::EXP:
decodeInstructionEXP(hexInstruction); decodeInstructionEXP(hexInstruction);
break; break;
default:
break;
} }
} }
@ -995,6 +1005,8 @@ u32 GcnDecodeContext::getMimgModifier(Opcode opcode) {
flags.set(MimgModifier::Pcf, MimgModifier::CoarseDerivative, MimgModifier::LodClamp, flags.set(MimgModifier::Pcf, MimgModifier::CoarseDerivative, MimgModifier::LodClamp,
MimgModifier::Offset); MimgModifier::Offset);
break; break;
default:
break;
} }
return flags.raw(); return flags.raw();

View file

@ -3718,6 +3718,8 @@ InstFormat InstructionFormat(InstEncoding encoding, uint32_t opcode) {
return InstructionFormatSOP2[opcode]; return InstructionFormatSOP2[opcode];
case InstEncoding::VOP2: case InstEncoding::VOP2:
return InstructionFormatVOP2[opcode]; return InstructionFormatVOP2[opcode];
default:
return {};
} }
UNREACHABLE(); UNREACHABLE();
return {}; return {};

View file

@ -1364,6 +1364,8 @@ U16U32U64 IREmitter::UConvert(size_t result_bitsize, const U16U32U64& value) {
switch (value.Type()) { switch (value.Type()) {
case Type::U16: case Type::U16:
return Inst<U32>(Opcode::ConvertU32U16, value); return Inst<U32>(Opcode::ConvertU32U16, value);
default:
break;
} }
default: default:
break; break;

View file

@ -81,6 +81,7 @@ bool Value::operator==(const Value& other) const {
case Type::F64x2: case Type::F64x2:
case Type::F64x3: case Type::F64x3:
case Type::F64x4: case Type::F64x4:
default:
break; break;
} }
UNREACHABLE_MSG("Invalid type {}", type); UNREACHABLE_MSG("Invalid type {}", type);