Matt Sinclair has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/53603 )
Change subject: arch-vega,arch-gcn3: Implement S_MEMTIME instruction
......................................................................
arch-vega,arch-gcn3: Implement S_MEMTIME instruction
M src/arch/amdgpu/gcn3/insts/instructions.cc
M src/arch/amdgpu/vega/insts/instructions.cc
2 files changed, 23 insertions(+), 2 deletions(-)
Approvals:
Matt Sinclair: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/amdgpu/gcn3/insts/instructions.cc
b/src/arch/amdgpu/gcn3/insts/instructions.cc
index 56a541c..8c51af5 100644
--- a/src/arch/amdgpu/gcn3/insts/instructions.cc
+++ b/src/arch/amdgpu/gcn3/insts/instructions.cc
@@ -5316,6 +5316,8 @@
Inst_SMEM__S_MEMTIME::Inst_SMEM__S_MEMTIME(InFmt_SMEM *iFmt)
: Inst_SMEM(iFmt, "s_memtime")
{
// s_memtime does not issue a memory request
setFlag(ALU);
} // Inst_SMEM__S_MEMTIME
Inst_SMEM__S_MEMTIME::~Inst_SMEM__S_MEMTIME()
@@ -5326,7 +5328,9 @@
void
Inst_SMEM__S_MEMTIME::execute(GPUDynInstPtr gpuDynInst)
{
panicUnimplemented();
ScalarOperandU64 sdst(gpuDynInst, instData.SDATA);
sdst = (ScalarRegU64)gpuDynInst->computeUnit()->curCycle();
sdst.write();
}
Inst_SMEM__S_MEMREALTIME::Inst_SMEM__S_MEMREALTIME(InFmt_SMEM *iFmt)
diff --git a/src/arch/amdgpu/vega/insts/instructions.cc
b/src/arch/amdgpu/vega/insts/instructions.cc
index f17e8b7..877bb09 100644
--- a/src/arch/amdgpu/vega/insts/instructions.cc
+++ b/src/arch/amdgpu/vega/insts/instructions.cc
@@ -5920,6 +5920,8 @@
Inst_SMEM__S_MEMTIME::Inst_SMEM__S_MEMTIME(InFmt_SMEM *iFmt)
: Inst_SMEM(iFmt, "s_memtime")
{
// s_memtime does not issue a memory request
setFlag(ALU);
} // Inst_SMEM__S_MEMTIME
Inst_SMEM__S_MEMTIME::~Inst_SMEM__S_MEMTIME()
@@ -5931,7 +5933,9 @@
void
Inst_SMEM__S_MEMTIME::execute(GPUDynInstPtr gpuDynInst)
{
panicUnimplemented();
ScalarOperandU64 sdst(gpuDynInst, instData.SDATA);
sdst = (ScalarRegU64)gpuDynInst->computeUnit()->curCycle();
sdst.write();
} // execute
// --- Inst_SMEM__S_MEMREALTIME class methods ---
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/53603
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: I3e286eb6ff8af4097ad03d4066be79f73d938cea
Gerrit-Change-Number: 53603
Gerrit-PatchSet: 6
Gerrit-Owner: Alexandru Duțu alexandru.dutu@amd.com
Gerrit-Reviewer: Bobby Bruce bbruce@ucdavis.edu
Gerrit-Reviewer: Matt Sinclair mattdsinclair@gmail.com
Gerrit-Reviewer: Matthew Poremba matthew.poremba@amd.com
Gerrit-Reviewer: kokoro noreply+kokoro@google.com
Gerrit-CC: Michael Boyer Michael.Boyer@amd.com
Gerrit-MessageType: merged