summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim
diff options
context:
space:
mode:
authorInderpreet Singh <[email protected]>2012-10-15 13:36:31 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:49:21 -0700
commitcca02c10622f5a3f29d864abad23e8138909dc18 (patch)
treee80c732758ecf1de4d75baa0a52df7713d97c858 /src/gpgpu-sim
parent013bb97792050d17a4e6dac95a18d16eed858a2e (diff)
Added functional execution support for shared memory atomic operations.
Integrated in CL14335 and CL14336 [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14366]
Diffstat (limited to 'src/gpgpu-sim')
-rw-r--r--src/gpgpu-sim/shader.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc
index 0dd8fd0..fb8165f 100644
--- a/src/gpgpu-sim/shader.cc
+++ b/src/gpgpu-sim/shader.cc
@@ -1169,6 +1169,10 @@ void ldst_unit::writeback()
case 0: // shared memory
if( !m_pipeline_reg[0]->empty() ) {
m_next_wb = *m_pipeline_reg[0];
+ if(m_next_wb.isatomic()) {
+ m_next_wb.do_atomic();
+ m_core->decrement_atomic_count(m_next_wb.warp_id(), m_next_wb.active_count());
+ }
m_core->dec_inst_in_pipeline(m_pipeline_reg[0]->warp_id());
m_pipeline_reg[0]->clear();
serviced_client = next_client;