[gem5-dev] Change in gem5/gem5[develop]: arch-vega: Add fatal when decoding missing insts

2021-07-12 Thread Matt Sinclair (Gerrit) via gem5-dev
Matt Sinclair has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47522 )


Change subject: arch-vega: Add fatal when decoding missing insts
..

arch-vega: Add fatal when decoding missing insts

Certain instructions don't have implementations in instructions.cc,
and get decoded as a nullptr.

This adds a fatal when decoding a missing instruction, as we aren't
able to properly run a program if all its instructions aren't
implemented, and it allows us to figure out which instruction is
missing due to fatals printing the line they were called.

Change-Id: I7e3690f079b790dceee102063773d5fbbc8619f1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47522
Reviewed-by: Matt Sinclair 
Maintainer: Matt Sinclair 
Tested-by: kokoro 
---
M src/arch/amdgpu/vega/decoder.cc
1 file changed, 229 insertions(+), 0 deletions(-)

Approvals:
  Matt Sinclair: Looks good to me, approved; 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 e4b7922..3054d1a 100644
--- a/src/arch/amdgpu/vega/decoder.cc
+++ b/src/arch/amdgpu/vega/decoder.cc
@@ -4440,6 +4440,7 @@
 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_MUL_HI_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

@@ -4452,42 +4453,49 @@
 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL1_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL2_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL3_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL4_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_PACK_LL_B32_B16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_PACK_LH_B32_B16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_HH_B32_B16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

@@ -4614,6 +4622,7 @@
 GPUStaticInst*
 Decoder::decode_OP_SOPK__S_CALL_B64(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

@@ -6834,108 +6843,126 @@
 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAD_U32_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAD_I32_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_XAD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MIN3_F16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MIN3_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MIN3_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAX3_F16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAX3_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAX3_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MED3_F16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MED3_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
   

[gem5-dev] Change in gem5/gem5[develop]: arch-vega: Add fatal when decoding missing insts

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47522 )



Change subject: arch-vega: Add fatal when decoding missing insts
..

arch-vega: Add fatal when decoding missing insts

Certain instructions don't have implementations in instructions.cc,
and get decoded as a nullptr.

This adds a fatal when decoding a missing instruction, as we aren't
able to properly run a program if all its instructions aren't
implemented, and it allows us to figure out which instruction i
missing due to fatals printing the line they were called.

Change-Id: I7e3690f079b790dceee102063773d5fbbc8619f1
---
M src/arch/amdgpu/vega/decoder.cc
1 file changed, 229 insertions(+), 0 deletions(-)



diff --git a/src/arch/amdgpu/vega/decoder.cc  
b/src/arch/amdgpu/vega/decoder.cc

index 480d326..94035f6 100644
--- a/src/arch/amdgpu/vega/decoder.cc
+++ b/src/arch/amdgpu/vega/decoder.cc
@@ -4437,6 +4437,7 @@
 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_MUL_HI_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

@@ -4449,42 +4450,49 @@
 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL1_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL2_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL3_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL4_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_PACK_LL_B32_B16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_PACK_LH_B32_B16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_HH_B32_B16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

@@ -4611,6 +4619,7 @@
 GPUStaticInst*
 Decoder::decode_OP_SOPK__S_CALL_B64(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

@@ -6831,108 +6840,126 @@
 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAD_U32_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAD_I32_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_XAD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MIN3_F16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MIN3_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MIN3_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAX3_F16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAX3_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAX3_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MED3_F16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MED3_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MED3_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode