summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/abstract_hardware_model.cc')
-rw-r--r--src/abstract_hardware_model.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc
index 1010d00..b164c73 100644
--- a/src/abstract_hardware_model.cc
+++ b/src/abstract_hardware_model.cc
@@ -181,6 +181,16 @@ void warp_inst_t::compute_simd_sets(unsigned num_sets, unsigned set_width) {
info.set_active_mask.reset();
info.active_mask_in_warp.reset();
info.num_active_threads = 0;
+ // Pipeline-register warp_inst_t objects are reused, so the per-set
+ // coissuer-tracking fields can be stale from a prior issue. The LSU
+ // gates on (!valid || source_inst == NULL); without these resets a
+ // primary's set inherits a previous coissue's source_inst != NULL
+ // and split_id, causing m_pending_writes_secondary to be incremented
+ // on a key no future decrement targets → deadlock under sb1.
+ info.split_id = (unsigned)-1;
+ info.source_inst = NULL;
+ info.source_mask.reset();
+ info.source_slot_id = (unsigned)-1;
for (unsigned lane = 0; lane < set_width; lane++) {
unsigned tid = s * set_width + lane;
info.thread_ids[lane] = tid;
@@ -208,6 +218,11 @@ void warp_inst_t::compute_simd_sets_compacted(unsigned num_sets,
info.num_active_threads = 0;
info.valid = false;
info.source_inst = NULL;
+ // Clear remaining coissuer-tracking state stale from prior reuse.
+ // (source_inst=NULL alone defends LSU; reset the rest for symmetry.)
+ info.split_id = (unsigned)-1;
+ info.source_mask.reset();
+ info.source_slot_id = (unsigned)-1;
for (unsigned i = 0; i < MAX_WARP_SIZE; i++) info.thread_ids[i] = 0;
}
@@ -251,6 +266,12 @@ void warp_inst_t::compute_simd_sets_xor_static(unsigned num_sets,
info.set_active_mask.reset();
info.active_mask_in_warp.reset();
info.num_active_threads = 0;
+ // See compute_simd_sets — clear coissuer-tracking state stale from
+ // prior issues on this reused pipeline-register slot.
+ info.split_id = (unsigned)-1;
+ info.source_inst = NULL;
+ info.source_mask.reset();
+ info.source_slot_id = (unsigned)-1;
}
// xor_key = reverse of the low log2(warp_size) bits of m_warp_id