diff options
| author | Inderpreet Singh <[email protected]> | 2011-12-25 22:21:01 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:19:01 -0700 |
| commit | b916cd600d109938a1621345bfc3c46da4bff4c6 (patch) | |
| tree | 5391fb6f1e659f24b479ce9a3a1f44641783552a /src/gpgpu-sim/shader.cc | |
| parent | 508c322551ccb5dfd2969344bcacde5ca759cf99 (diff) | |
Fix for Bug 123: Use of constant in shader_core_ctx::func_exec_inst function
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11227]
Diffstat (limited to 'src/gpgpu-sim/shader.cc')
| -rw-r--r-- | src/gpgpu-sim/shader.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc index b37ceef..7ef5140 100644 --- a/src/gpgpu-sim/shader.cc +++ b/src/gpgpu-sim/shader.cc @@ -608,7 +608,7 @@ void shader_core_ctx::func_exec_inst( warp_inst_t &inst ) if( inst.has_callback(t) ) m_warp[inst.warp_id()].inc_n_atomic(); if (inst.space.is_local() && (inst.is_load() || inst.is_store())) { - new_addr_type localaddrs[8]; + new_addr_type localaddrs[MAX_ACCESSES_PER_INSN_PER_THREAD]; unsigned num_addrs; num_addrs = translate_local_memaddr(inst.get_addr(t), tid, m_config->n_simt_clusters*m_config->n_simt_cores_per_cluster, inst.data_size, (new_addr_type*) localaddrs ); @@ -797,7 +797,7 @@ unsigned shader_core_ctx::translate_local_memaddr( address_type localaddr, unsig assert(datasize%4 == 0); assert(datasize >= 4); - assert(datasize <= 32); // max 32B + assert(datasize/4 <= MAX_ACCESSES_PER_INSN_PER_THREAD); // max 32B 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; |
