diff options
author | Tony Gutierrez <anthony.gutierrez@amd.com> | 2016-10-26 22:47:43 -0400 |
---|---|---|
committer | Tony Gutierrez <anthony.gutierrez@amd.com> | 2016-10-26 22:47:43 -0400 |
commit | 844fb845a51b15f13c7c744e0d5fdf5567c3da98 (patch) | |
tree | 407cd19c909cdf3cd4da7947ad86dfbd4470ef68 /src/arch/hsail/gpu_isa.hh | |
parent | d327cdba078e0956596513b518731e9ec730723f (diff) | |
download | gem5-844fb845a51b15f13c7c744e0d5fdf5567c3da98.tar.xz |
gpu-compute, hsail: make the PC a byte address, not an instruction index
currently the PC is incremented on an instruction granularity, and not as an
instruction's byte address. machine ISA instructions assume the PC is a byte
address, and is incremented accordingly. here we make the GPU model, and the
HSAIL instructions treat the PC as a byte address as well.
Diffstat (limited to 'src/arch/hsail/gpu_isa.hh')
-rw-r--r-- | src/arch/hsail/gpu_isa.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/hsail/gpu_isa.hh b/src/arch/hsail/gpu_isa.hh index dbd816d91..caee776f1 100644 --- a/src/arch/hsail/gpu_isa.hh +++ b/src/arch/hsail/gpu_isa.hh @@ -38,6 +38,7 @@ #include <cstdint> +#include "arch/hsail/gpu_types.hh" #include "base/misc.hh" #include "gpu-compute/misc.hh" @@ -71,7 +72,7 @@ namespace HsailISA uint32_t advancePC(uint32_t old_pc, GPUDynInstPtr gpuDynInst) { - return old_pc + 1; + return old_pc + sizeof(RawMachInst); } private: |