From 16de253c156c1456fe54421857e6f52f07063e23 Mon Sep 17 00:00:00 2001 From: Matthew Poremba Date: Tue, 22 Jun 2021 18:37:32 -0500 Subject: [PATCH] arch-vega: Add missing functions referenced by insts Some instructions were referencing pc() and isExecMaskRegister() which were not defined. Change-Id: Ic5b3fa9057950ff85603fcb87447a81b6c7f274b Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47103 Tested-by: kokoro Reviewed-by: Matt Sinclair Maintainer: Matt Sinclair --- src/arch/amdgpu/vega/insts/gpu_static_inst.hh | 6 ++++++ src/gpu-compute/gpu_dyn_inst.cc | 12 ++++++++++++ src/gpu-compute/gpu_dyn_inst.hh | 3 +++ 3 files changed, 21 insertions(+) diff --git a/src/arch/amdgpu/vega/insts/gpu_static_inst.hh b/src/arch/amdgpu/vega/insts/gpu_static_inst.hh index 64151f79d3..fa2a8e1651 100644 --- a/src/arch/amdgpu/vega/insts/gpu_static_inst.hh +++ b/src/arch/amdgpu/vega/insts/gpu_static_inst.hh @@ -60,6 +60,12 @@ namespace VegaISA return isFlatScratchReg(opIdx); } + bool + isExecMaskRegister(int opIdx) override + { + return isExecMask(opIdx); + } + void initOperandInfo() override { return; } int getOperandSize(int opIdx) override { return 0; } diff --git a/src/gpu-compute/gpu_dyn_inst.cc b/src/gpu-compute/gpu_dyn_inst.cc index 937e572f03..1eadfa9176 100644 --- a/src/gpu-compute/gpu_dyn_inst.cc +++ b/src/gpu-compute/gpu_dyn_inst.cc @@ -284,6 +284,18 @@ GPUDynInst::seqNum() const return _seqNum; } +Addr +GPUDynInst::pc() +{ + return wavefront()->pc(); +} + +void +GPUDynInst::pc(Addr _pc) +{ + wavefront()->pc(_pc); +} + enums::StorageClassType GPUDynInst::executedAs() { diff --git a/src/gpu-compute/gpu_dyn_inst.hh b/src/gpu-compute/gpu_dyn_inst.hh index ae8260e7fe..f673afe3ce 100644 --- a/src/gpu-compute/gpu_dyn_inst.hh +++ b/src/gpu-compute/gpu_dyn_inst.hh @@ -162,6 +162,9 @@ class GPUDynInst : public GPUExecContext InstSeqNum seqNum() const; + Addr pc(); + void pc(Addr _pc); + enums::StorageClassType executedAs(); // virtual address for scalar memory operations