changeset 6fd588813142 in /z/repo/m5 details: http://repo.m5sim.org/m5?cmd=changeset;node=6fd588813142 description: O3: Fix offset calculation into storeQueue buffer for store->load forwarding
Calculation of offset to copy from storeQueue[idx].data structure for load to store forwarding fixed to be difference in bytes between store and load virtual addresses. Previous method would induce bug where a load would index into buffer at the wrong location. diffstat: src/cpu/o3/lsq_unit.hh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 6173b87e7652 -r 6fd588813142 src/cpu/o3/lsq_unit.hh --- a/src/cpu/o3/lsq_unit.hh Mon May 23 10:40:19 2011 -0500 +++ b/src/cpu/o3/lsq_unit.hh Mon May 23 10:40:21 2011 -0500 @@ -616,7 +616,7 @@ // If the store's data has all of the data needed, we can forward. if ((store_has_lower_limit && store_has_upper_limit)) { // Get shift amount for offset into the store's data. - int shift_amt = req->getVaddr() & (store_size - 1); + int shift_amt = req->getVaddr() - storeQueue[store_idx].inst->effAddr; memcpy(data, storeQueue[store_idx].data + shift_amt, req->getSize()); _______________________________________________ gem5-dev mailing list gem5-dev@m5sim.org http://m5sim.org/mailman/listinfo/gem5-dev