summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 166ba88..5c94fa3 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 + thread_base;
+ address_type linear_address = local_word*max_concurrent_threads*4 + thread_base;
translated_addrs[i] = linear_address;
}
return datasize/4;