From e3b19cb294c98466a431950888045c6b5d24b675 Mon Sep 17 00:00:00 2001 From: Curtis Dunham Date: Tue, 13 May 2014 12:20:48 -0500 Subject: 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. --- src/cpu/ozone/lw_lsq_impl.hh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/cpu/ozone/lw_lsq_impl.hh') diff --git a/src/cpu/ozone/lw_lsq_impl.hh b/src/cpu/ozone/lw_lsq_impl.hh index ed036d664..37c164a1c 100644 --- a/src/cpu/ozone/lw_lsq_impl.hh +++ b/src/cpu/ozone/lw_lsq_impl.hh @@ -577,10 +577,7 @@ OzoneLWLSQ::writebackStores() memcpy(inst->memData, (uint8_t *)&(*sq_it).data, req->getSize()); - MemCmd command = - req->isSwap() ? MemCmd::SwapReq : - (req->isLLSC() ? MemCmd::WriteReq : MemCmd::StoreCondReq); - PacketPtr data_pkt = new Packet(req, command); + PacketPtr data_pkt = Packet::createWrite(req); data_pkt->dataStatic(inst->memData); LSQSenderState *state = new LSQSenderState; -- cgit v1.2.3