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.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.hh')
-rw-r--r-- | src/cpu/o3/lsq_unit.hh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cpu/o3/lsq_unit.hh b/src/cpu/o3/lsq_unit.hh index cb892a4fd..cfb9b8288 100644 --- a/src/cpu/o3/lsq_unit.hh +++ b/src/cpu/o3/lsq_unit.hh @@ -776,8 +776,7 @@ LSQUnit<Impl>::read(Request *req, Request *sreqLow, Request *sreqHigh, // if we the cache is not blocked, do cache access bool completedFirst = false; - MemCmd command = req->isLLSC() ? MemCmd::LoadLockedReq : MemCmd::ReadReq; - PacketPtr data_pkt = new Packet(req, command); + PacketPtr data_pkt = Packet::createRead(req); PacketPtr fst_data_pkt = NULL; PacketPtr snd_data_pkt = NULL; @@ -794,8 +793,8 @@ LSQUnit<Impl>::read(Request *req, Request *sreqLow, Request *sreqHigh, fst_data_pkt = data_pkt; } else { // Create the split packets. - fst_data_pkt = new Packet(sreqLow, command); - snd_data_pkt = new Packet(sreqHigh, command); + fst_data_pkt = Packet::createRead(sreqLow); + snd_data_pkt = Packet::createRead(sreqHigh); fst_data_pkt->dataStatic(load_inst->memData); snd_data_pkt->dataStatic(load_inst->memData + sreqLow->getSize()); |