diff options
author | Brandon Potter <Brandon.Potter@amd.com> | 2017-03-01 13:07:43 -0600 |
---|---|---|
committer | Brandon Potter <Brandon.Potter@amd.com> | 2017-03-09 19:19:38 +0000 |
commit | 43418e7f81099072fb7d56dae11110ae1d858162 (patch) | |
tree | 0d624abfdd331b0edffcafc274c08695d0cca97b /src/gpu-compute/shader.cc | |
parent | 71dd6c2c17a465b7705f53469cd2c89f16ede4b7 (diff) | |
download | gem5-43418e7f81099072fb7d56dae11110ae1d858162.tar.xz |
syscall-emul: Move memState into its own file
The Process class is full of implementation details and
structures related to SE Mode. This changeset factors out an
internal class from Process and moves it into a separate file.
The purpose behind doing this is to clean up the code and make
it a bit more modular.
Change-Id: Ic6941a1657751e8d51d5b6b1dcc04f1195884280
Reviewed-on: https://gem5-review.googlesource.com/2263
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/gpu-compute/shader.cc')
-rw-r--r-- | src/gpu-compute/shader.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gpu-compute/shader.cc b/src/gpu-compute/shader.cc index 6c328a7fd..6d6154503 100644 --- a/src/gpu-compute/shader.cc +++ b/src/gpu-compute/shader.cc @@ -83,15 +83,16 @@ Shader::mmap(int length) if (proc->mmapGrowsDown()) { DPRINTF(HSAIL, "GROWS DOWN"); - start = mem_state->mmapEnd - length; - mem_state->mmapEnd = start; + start = mem_state->getMmapEnd() - length; + mem_state->setMmapEnd(start); } else { DPRINTF(HSAIL, "GROWS UP"); - start = mem_state->mmapEnd; - mem_state->mmapEnd += length; + start = mem_state->getMmapEnd(); + mem_state->setMmapEnd(start + length); // assertion to make sure we don't overwrite the stack (it grows down) - assert(mem_state->stackBase - proc->maxStackSize > mem_state->mmapEnd); + assert(mem_state->getStackBase() - mem_state->getMaxStackSize() > + mem_state->getMmapEnd()); } DPRINTF(HSAIL,"Shader::mmap start= %#x, %#x\n", start, length); |