arch-vega,arch-gcn3: Implement S_MEMTIME instruction

Change-Id: I3e286eb6ff8af4097ad03d4066be79f73d938cea
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53603
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Michael Boyer
2021-06-25 18:34:47 -05:00
committed by Matt Sinclair
parent b31192f539
commit 81058189af
2 changed files with 10 additions and 2 deletions

View File

@@ -5316,6 +5316,8 @@ namespace Gcn3ISA
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 @@ namespace Gcn3ISA
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)

View File

@@ -5920,6 +5920,8 @@ namespace VegaISA
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 @@ namespace VegaISA
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 ---