summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim
diff options
context:
space:
mode:
authorInderpreet Singh <[email protected]>2011-05-26 17:32:08 -0800
committerInderpreet Singh <[email protected]>2011-05-26 17:32:08 -0800
commitebcce12866073049eb7eecb7f052bac7c46d04cc (patch)
tree974238db82f9fe3bf4b56970ac120f251b0c7591 /src/gpgpu-sim
parent6b2e74983e0eaa2c7f9aed429c3be66ba22dbc0b (diff)
Another local memory address translation bug fix - it now adds an offset to prevent writing over symbol global memory and kernel param memory at address 0x0
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 9354]
Diffstat (limited to 'src/gpgpu-sim')
-rw-r--r--src/gpgpu-sim/shader.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc
index 5c94fa3..f7ef19a 100644
--- a/src/gpgpu-sim/shader.cc
+++ b/src/gpgpu-sim/shader.cc
@@ -835,7 +835,7 @@ unsigned shader_core_ctx::translate_local_memaddr( address_type localaddr, unsig
assert(localaddr%4 == 0); // Required if accessing 4B per request, otherwise access will overflow into next thread's space
for(unsigned i=0; i<datasize/4; i++) {
address_type local_word = localaddr/4 + i;
- address_type linear_address = local_word*max_concurrent_threads*4 + thread_base;
+ address_type linear_address = local_word*max_concurrent_threads*4 + thread_base + LOCAL_GENERIC_START;
translated_addrs[i] = linear_address;
}
return datasize/4;