Matt Sinclair has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/47521 )

Change subject: arch-vega: Add decoding for implemented insts
......................................................................

arch-vega: Add decoding for implemented insts

Certain instructions were implemented in instructions.cc,
but weren't actually being decoded by the decoder, causing
the decoder to return nullptr for valid instructions.

This patch fixes the decoder to return the proper instruction
class for implemented instructions

Change-Id: I8d8525a1c435147017cb38d9df8e1675986ef04b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47521
Reviewed-by: Matt Sinclair <[email protected]>
Reviewed-by: Matthew Poremba <[email protected]>
Reviewed-by: Alex Dutu <[email protected]>
Maintainer: Matt Sinclair <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/amdgpu/vega/decoder.cc
1 file changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Alex Dutu: Looks good to me, approved
  Matthew Poremba: Looks good to me, approved
Matt Sinclair: Looks good to me, but someone else must approve; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/amdgpu/vega/decoder.cc b/src/arch/amdgpu/vega/decoder.cc
index 359e125..e4b7922 100644
--- a/src/arch/amdgpu/vega/decoder.cc
+++ b/src/arch/amdgpu/vega/decoder.cc
@@ -4158,19 +4158,19 @@
     GPUStaticInst*
     Decoder::decode_OP_VOP2__V_ADD_U32(MachInst iFmt)
     {
-        return nullptr;
+        return new Inst_VOP2__V_ADD_U32(&iFmt->iFmt_VOP2);
     }

     GPUStaticInst*
     Decoder::decode_OP_VOP2__V_SUB_U32(MachInst iFmt)
     {
-        return nullptr;
+        return new Inst_VOP2__V_SUB_U32(&iFmt->iFmt_VOP2);
     }

     GPUStaticInst*
     Decoder::decode_OP_VOP2__V_SUBREV_U32(MachInst iFmt)
     {
-        return nullptr;
+        return new Inst_VOP2__V_SUBREV_U32(&iFmt->iFmt_VOP2);
     }

     GPUStaticInst*
@@ -4446,7 +4446,7 @@
     GPUStaticInst*
     Decoder::decode_OP_SOP2__S_MUL_HI_I32(MachInst iFmt)
     {
-        return nullptr;
+        return new Inst_SOP2__S_MUL_I32(&iFmt->iFmt_SOP2);
     }

     GPUStaticInst*
@@ -6942,31 +6942,31 @@
     GPUStaticInst*
     Decoder::decode_OPU_VOP3__V_MAD_F16(MachInst iFmt)
     {
-        return nullptr;
+        return new Inst_VOP3__V_MAD_F16(&iFmt->iFmt_VOP3A);
     }

     GPUStaticInst*
     Decoder::decode_OPU_VOP3__V_MAD_U16(MachInst iFmt)
     {
-        return nullptr;
+        return new Inst_VOP3__V_MAD_U16(&iFmt->iFmt_VOP3A);
     }

     GPUStaticInst*
     Decoder::decode_OPU_VOP3__V_MAD_I16(MachInst iFmt)
     {
-        return nullptr;
+        return new Inst_VOP3__V_MAD_I16(&iFmt->iFmt_VOP3A);
     }

     GPUStaticInst*
     Decoder::decode_OPU_VOP3__V_FMA_F16(MachInst iFmt)
     {
-        return nullptr;
+        return new Inst_VOP3__V_FMA_F16(&iFmt->iFmt_VOP3A);
     }

     GPUStaticInst*
     Decoder::decode_OPU_VOP3__V_DIV_FIXUP_F16(MachInst iFmt)
     {
-        return nullptr;
+        return new Inst_VOP3__V_DIV_FIXUP_F16(&iFmt->iFmt_VOP3A);
     }

     GPUStaticInst*

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47521
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I8d8525a1c435147017cb38d9df8e1675986ef04b
Gerrit-Change-Number: 47521
Gerrit-PatchSet: 2
Gerrit-Owner: Kyle Roarty <[email protected]>
Gerrit-Reviewer: Alex Dutu <[email protected]>
Gerrit-Reviewer: Matt Sinclair <[email protected]>
Gerrit-Reviewer: Matthew Poremba <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to