arch-gcn3, gpu-compute: Fix issue when reading const operands
authorTony Gutierrez <anthony.gutierrez@amd.com>
Thu, 26 Jul 2018 21:28:39 +0000 (17:28 -0400)
committerAnthony Gutierrez <anthony.gutierrez@amd.com>
Mon, 22 Jun 2020 16:14:35 +0000 (16:14 +0000)
commitccee639904b6735d7424db2242685c6e90608ab1
tree0d52223dec168232dcb79179abd8ccb97c9af93c
parent8c3e9a19d5c9bdc26b6b06cf0440cff0f1cd89b5
arch-gcn3, gpu-compute: Fix issue when reading const operands

Currently, when an instruction has an operand that reads a const
value, it goes thru the same readMiscReg() api call as other
misc registers (real HW registers, not constant values). There
is an issue, however, when casting from the const values (which are
32b) to higher precision values, like 64b.

This change creates a separate, templated function call to the GPU's
ISA state that will return the correct type.

Change-Id: I41965ebeeed20bb70e919fce5ad94d957b3af802
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29927
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/gcn3/gpu_isa.hh
src/arch/gcn3/isa.cc
src/arch/gcn3/operand.hh
src/arch/gcn3/registers.cc
src/arch/gcn3/registers.hh
src/gpu-compute/gpu_exec_context.hh