summaryrefslogtreecommitdiff
path: root/src/cuda-sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuda-sim')
-rw-r--r--src/cuda-sim/cuda-sim.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc
index fb72f25..2a88e5a 100644
--- a/src/cuda-sim/cuda-sim.cc
+++ b/src/cuda-sim/cuda-sim.cc
@@ -1157,6 +1157,15 @@ void ptx_instruction::pre_decode() {
break;
}
+ // Pre-tag atomics on the static template so co-issue eligibility checks
+ // (mem_coissue_disallowed in shader.cc) can detect them at candidate-scan
+ // time. Without this, m_isatomic only gets set during per-instance
+ // functional execution (add_callback path), which is too late — the
+ // intra co-issue scan reads the SHARED template's flag and would
+ // mistakenly admit an atomic into a composite, leaving the warp's
+ // n_atomic counter unbalanced and the warp stuck in waiting().
+ if (m_opcode == ATOM_OP) m_isatomic = true;
+
set_opcode_and_latency();
set_bar_type();
// Get register operands