diff options
| author | Inderpreet Singh <[email protected]> | 2011-05-26 17:32:08 -0800 |
|---|---|---|
| committer | Inderpreet Singh <[email protected]> | 2011-05-26 17:32:08 -0800 |
| commit | ebcce12866073049eb7eecb7f052bac7c46d04cc (patch) | |
| tree | 974238db82f9fe3bf4b56970ac120f251b0c7591 | |
| parent | 6b2e74983e0eaa2c7f9aed429c3be66ba22dbc0b (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]
| -rw-r--r-- | src/gpgpu-sim/shader.cc | 2 |
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; |
