diff options
author | Curtis Dunham <Curtis.Dunham@arm.com> | 2014-05-13 12:20:48 -0500 |
---|---|---|
committer | Curtis Dunham <Curtis.Dunham@arm.com> | 2014-05-13 12:20:48 -0500 |
commit | e3b19cb294c98466a431950888045c6b5d24b675 (patch) | |
tree | 781bcf5ea9fdce45a5747a4d5ef74485ee5e0727 /src/cpu/o3/lsq_unit_impl.hh | |
parent | afbae1ec95e94b6da441a0269dbd9359a7069e3d (diff) | |
download | gem5-e3b19cb294c98466a431950888045c6b5d24b675.tar.xz |
mem: Refactor assignment of Packet types
Put the packet type swizzling (that is currently done in a lot of places)
into a refineCommand() member function.
Diffstat (limited to 'src/cpu/o3/lsq_unit_impl.hh')
-rw-r--r-- | src/cpu/o3/lsq_unit_impl.hh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cpu/o3/lsq_unit_impl.hh b/src/cpu/o3/lsq_unit_impl.hh index 90092cf0e..b63a590fb 100644 --- a/src/cpu/o3/lsq_unit_impl.hh +++ b/src/cpu/o3/lsq_unit_impl.hh @@ -839,9 +839,6 @@ LSQUnit<Impl>::writebackStores() else memcpy(inst->memData, storeQueue[storeWBIdx].data, req->getSize()); - MemCmd command = - req->isSwap() ? MemCmd::SwapReq : - (req->isLLSC() ? MemCmd::StoreCondReq : MemCmd::WriteReq); PacketPtr data_pkt; PacketPtr snd_data_pkt = NULL; @@ -853,13 +850,13 @@ LSQUnit<Impl>::writebackStores() if (!TheISA::HasUnalignedMemAcc || !storeQueue[storeWBIdx].isSplit) { // Build a single data packet if the store isn't split. - data_pkt = new Packet(req, command); + data_pkt = Packet::createWrite(req); data_pkt->dataStatic(inst->memData); data_pkt->senderState = state; } else { // Create two packets if the store is split in two. - data_pkt = new Packet(sreqLow, command); - snd_data_pkt = new Packet(sreqHigh, command); + data_pkt = Packet::createWrite(sreqLow); + snd_data_pkt = Packet::createWrite(sreqHigh); data_pkt->dataStatic(inst->memData); snd_data_pkt->dataStatic(inst->memData + sreqLow->getSize()); |