cpu: Fix barrier push to store buffer when full bug in Minor
This patch fixes a bug where a completing load or store which is also a barrier can push a barrier into the store buffer without first checking that there is a free slot. The bug was not fatal but would print a warning that the store buffer was full when inserting.
This commit is contained in:
parent
4024fab7fc
commit
536c72333f
1 changed files with 7 additions and 3 deletions
|
@ -1370,9 +1370,13 @@ LSQ::findResponse(MinorDynInstPtr inst)
|
||||||
/* Same instruction and complete access or a store that's
|
/* Same instruction and complete access or a store that's
|
||||||
* capable of being moved to the store buffer */
|
* capable of being moved to the store buffer */
|
||||||
if (request->inst->id == inst->id) {
|
if (request->inst->id == inst->id) {
|
||||||
if (request->isComplete() ||
|
bool complete = request->isComplete();
|
||||||
(request->state == LSQRequest::StoreToStoreBuffer &&
|
bool can_store = storeBuffer.canInsert();
|
||||||
storeBuffer.canInsert()))
|
bool to_store_buffer = request->state ==
|
||||||
|
LSQRequest::StoreToStoreBuffer;
|
||||||
|
|
||||||
|
if ((complete && !(request->isBarrier() && !can_store)) ||
|
||||||
|
(to_store_buffer && can_store))
|
||||||
{
|
{
|
||||||
ret = request;
|
ret = request;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue