Formatting has been changed to pass clang format checking

This commit is contained in:
ivan999 2025-06-16 09:16:56 +03:00
parent 2a1a1045ec
commit cee8814be5
2 changed files with 15 additions and 19 deletions

View file

@ -37,10 +37,8 @@ bool IsVop3BEncoding(Opcode opcode) {
opcode == Opcode::V_MAD_U64_U32 || opcode == Opcode::V_MAD_I64_I32; opcode == Opcode::V_MAD_U64_U32 || opcode == Opcode::V_MAD_I64_I32;
} }
inline void GcnDecodeContext::decodeInstruction32(void (GcnDecodeContext::*decodeFunc)(u32),
inline void GcnDecodeContext::decodeInstruction32( OpcodeMap opcodeMap, GcnCodeSlice& code) {
void (GcnDecodeContext::*decodeFunc)(u32), OpcodeMap opcodeMap, GcnCodeSlice& code
) {
u32 instruction = code.readu32(); u32 instruction = code.readu32();
// Decode instruction using the provided decode function. // Decode instruction using the provided decode function.
(this->*decodeFunc)(instruction); (this->*decodeFunc)(instruction);
@ -51,9 +49,8 @@ inline void GcnDecodeContext::decodeInstruction32(
decodeLiteralConstant(opcodeMap, code); decodeLiteralConstant(opcodeMap, code);
} }
inline void GcnDecodeContext::decodeInstruction64( inline void GcnDecodeContext::decodeInstruction64(void (GcnDecodeContext::*decodeFunc)(uint64_t),
void (GcnDecodeContext::*decodeFunc)(uint64_t), OpcodeMap opcodeMap, GcnCodeSlice& code OpcodeMap opcodeMap, GcnCodeSlice& code) {
) {
uint64_t instruction = code.readu64(); uint64_t instruction = code.readu64();
// Decode instruction using the provided decode function. // Decode instruction using the provided decode function.
(this->*decodeFunc)(instruction); (this->*decodeFunc)(instruction);
@ -96,7 +93,8 @@ inline void GcnDecodeContext::decodeInstructionFromMask6bit(GcnCodeSlice& code)
m_instruction.encoding = static_cast<InstEncoding>(code.at(0) & (u32)EncodingMask::MASK_6bit); m_instruction.encoding = static_cast<InstEncoding>(code.at(0) & (u32)EncodingMask::MASK_6bit);
switch (m_instruction.encoding) { switch (m_instruction.encoding) {
case InstEncoding::VINTRP: case InstEncoding::VINTRP:
decodeInstruction32(&GcnDecodeContext::decodeInstructionVINTRP, OpcodeMap::OP_MAP_VINTRP, code); decodeInstruction32(&GcnDecodeContext::decodeInstructionVINTRP, OpcodeMap::OP_MAP_VINTRP,
code);
break; break;
case InstEncoding::VOP3: case InstEncoding::VOP3:
decodeInstruction64(&GcnDecodeContext::decodeInstructionVOP3, OpcodeMap::OP_MAP_VOP3, code); decodeInstruction64(&GcnDecodeContext::decodeInstructionVOP3, OpcodeMap::OP_MAP_VOP3, code);
@ -108,10 +106,12 @@ inline void GcnDecodeContext::decodeInstructionFromMask6bit(GcnCodeSlice& code)
decodeInstruction64(&GcnDecodeContext::decodeInstructionDS, OpcodeMap::OP_MAP_DS, code); decodeInstruction64(&GcnDecodeContext::decodeInstructionDS, OpcodeMap::OP_MAP_DS, code);
break; break;
case InstEncoding::MUBUF: case InstEncoding::MUBUF:
decodeInstruction64(&GcnDecodeContext::decodeInstructionMUBUF, OpcodeMap::OP_MAP_MUBUF, code); decodeInstruction64(&GcnDecodeContext::decodeInstructionMUBUF, OpcodeMap::OP_MAP_MUBUF,
code);
break; break;
case InstEncoding::MTBUF: case InstEncoding::MTBUF:
decodeInstruction64(&GcnDecodeContext::decodeInstructionMTBUF, OpcodeMap::OP_MAP_MTBUF, code); decodeInstruction64(&GcnDecodeContext::decodeInstructionMTBUF, OpcodeMap::OP_MAP_MTBUF,
code);
break; break;
case InstEncoding::MIMG: case InstEncoding::MIMG:
decodeInstruction64(&GcnDecodeContext::decodeInstructionMIMG, OpcodeMap::OP_MAP_MIMG, code); decodeInstruction64(&GcnDecodeContext::decodeInstructionMIMG, OpcodeMap::OP_MAP_MIMG, code);

View file

@ -58,15 +58,11 @@ private:
void repairOperandType(); void repairOperandType();
OperandField getOperandField(uint32_t code); OperandField getOperandField(uint32_t code);
void decodeInstruction32(void ( void decodeInstruction32(void (GcnDecodeContext::*decodeFunc)(u32), OpcodeMap opcodeMap,
GcnDecodeContext::*decodeFunc)(u32), GcnCodeSlice& code);
OpcodeMap opcodeMap, GcnCodeSlice& code void decodeInstruction64(void (GcnDecodeContext::*decodeFunc)(uint64_t), OpcodeMap opcodeMap,
); GcnCodeSlice& code);
void decodeInstruction64(void (
GcnDecodeContext::*decodeFunc)(uint64_t),
OpcodeMap opcodeMap, GcnCodeSlice& code
);
void decodeInstructionFromMask9bit(GcnCodeSlice& code); void decodeInstructionFromMask9bit(GcnCodeSlice& code);
void decodeInstructionFromMask7bit(GcnCodeSlice& code); void decodeInstructionFromMask7bit(GcnCodeSlice& code);