From 7cdb69bf21b84ac5182ef47bf11990393427fc0a Mon Sep 17 00:00:00 2001 From: Matthew Poremba Date: Fri, 31 May 2024 09:27:10 -0700 Subject: [PATCH] arch-vega: Fill in scratch insts to match flat/global Flat, scratch, and global share the same instruction implementation with different address calculations essentially. These instructions were already implemented but not added to the decoder. This commit adds the remaining scratch instructions which have a shared instruction implementation. Change-Id: I8f2e9ceb221294dce1b81c45745b642f0592d985 --- src/arch/amdgpu/vega/gpu_decoder.cc | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/arch/amdgpu/vega/gpu_decoder.cc b/src/arch/amdgpu/vega/gpu_decoder.cc index 0f4b1e9872..8c12013ae8 100644 --- a/src/arch/amdgpu/vega/gpu_decoder.cc +++ b/src/arch/amdgpu/vega/gpu_decoder.cc @@ -8622,7 +8622,6 @@ namespace VegaISA Decoder::decode_OP_GLOBAL__GLOBAL_STORE_DWORD(MachInst iFmt) { return new Inst_FLAT__FLAT_STORE_DWORD(&iFmt->iFmt_FLAT); - return nullptr; } GPUStaticInst* @@ -9898,29 +9897,25 @@ namespace VegaISA GPUStaticInst* Decoder::decode_OP_SCRATCH__SCRATCH_LOAD_UBYTE(MachInst iFmt) { - fatal("Trying to decode instruction without a class\n"); - return nullptr; + return new Inst_FLAT__FLAT_LOAD_UBYTE(&iFmt->iFmt_FLAT); } GPUStaticInst* Decoder::decode_OP_SCRATCH__SCRATCH_LOAD_SBYTE(MachInst iFmt) { - fatal("Trying to decode instruction without a class\n"); - return nullptr; + return new Inst_FLAT__FLAT_LOAD_SBYTE(&iFmt->iFmt_FLAT); } GPUStaticInst* Decoder::decode_OP_SCRATCH__SCRATCH_LOAD_USHORT(MachInst iFmt) { - fatal("Trying to decode instruction without a class\n"); - return nullptr; + return new Inst_FLAT__FLAT_LOAD_USHORT(&iFmt->iFmt_FLAT); } GPUStaticInst* Decoder::decode_OP_SCRATCH__SCRATCH_LOAD_SSHORT(MachInst iFmt) { - fatal("Trying to decode instruction without a class\n"); - return nullptr; + return new Inst_FLAT__FLAT_LOAD_SSHORT(&iFmt->iFmt_FLAT); } GPUStaticInst* @@ -9950,8 +9945,7 @@ namespace VegaISA GPUStaticInst* Decoder::decode_OP_SCRATCH__SCRATCH_STORE_BYTE(MachInst iFmt) { - fatal("Trying to decode instruction without a class\n"); - return nullptr; + return new Inst_FLAT__FLAT_STORE_BYTE(&iFmt->iFmt_FLAT); } GPUStaticInst* @@ -9964,8 +9958,7 @@ namespace VegaISA GPUStaticInst* Decoder::decode_OP_SCRATCH__SCRATCH_STORE_SHORT(MachInst iFmt) { - fatal("Trying to decode instruction without a class\n"); - return nullptr; + return new Inst_FLAT__FLAT_STORE_SHORT(&iFmt->iFmt_FLAT); } GPUStaticInst*