Sort opcodes by their indices. Group them too when applicable (#945)

This commit is contained in:
korenkonder 2024-09-19 21:29:56 +03:00 committed by GitHub
parent c0f7de9fde
commit 07de1ee977
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 1634 additions and 1543 deletions

View file

@ -9,6 +9,7 @@ static constexpr u32 SQ_SRC_LITERAL = 0xFF;
void Translator::EmitScalarMemory(const GcnInst& inst) {
switch (inst.opcode) {
// SMRD
case Opcode::S_LOAD_DWORDX4:
return S_LOAD_DWORD(4, inst);
case Opcode::S_LOAD_DWORDX8:
@ -30,6 +31,8 @@ void Translator::EmitScalarMemory(const GcnInst& inst) {
}
}
// SMRD
void Translator::S_LOAD_DWORD(int num_dwords, const GcnInst& inst) {
const auto& smrd = inst.control.smrd;
const u32 dword_offset = [&] -> u32 {