Review Board 2.0.15


gpu-compute: use the GPUISA object to advance the PC

Review Request #3652 - Created Oct. 10, 2016 and submitted - Latest diff uploaded

Information
Tony Gutierrez
gem5
default
Reviewers
Default
Changeset 11679:5695d76ec68b
---------------------------
gpu-compute: use the GPUISA object to advance the PC

the GPU model treats the PC as a pointer to individual instruction objects -
which are store in a contiguous array - and not a byte address to be fetched
from the real memory system. this is ok for HSAIL because all instructions are
considered by the model to be the same size.

in machine ISA, however, instructions may be 32b or 64b, and branches are
calculated by advancing the PC by the number of words (4 byte chunks) it
needs to advance in the real instruction stream. because of this there is
a mismatch between the PC we use to index into the instruction array, and
the actual byte address PC the ISA expects. here we move the PC advance
calculation to the ISA so that differences in the instrucion sizes may be
accounted for in generic way.