summaryrefslogtreecommitdiff
path: root/src/cpu/minor/lsq.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/minor/lsq.cc')
-rw-r--r--src/cpu/minor/lsq.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/cpu/minor/lsq.cc b/src/cpu/minor/lsq.cc
index 06b6c5165..ff609deac 100644
--- a/src/cpu/minor/lsq.cc
+++ b/src/cpu/minor/lsq.cc
@@ -1545,18 +1545,8 @@ PacketPtr
makePacketForRequest(Request &request, bool isLoad,
Packet::SenderState *sender_state, PacketDataPtr data)
{
- MemCmd command;
-
- /* Make a ret with the right command type to match the request */
- if (request.isLLSC()) {
- command = (isLoad ? MemCmd::LoadLockedReq : MemCmd::StoreCondReq);
- } else if (request.isSwap()) {
- command = MemCmd::SwapReq;
- } else {
- command = (isLoad ? MemCmd::ReadReq : MemCmd::WriteReq);
- }
-
- PacketPtr ret = new Packet(&request, command);
+ PacketPtr ret = isLoad ? Packet::createRead(&request)
+ : Packet::createWrite(&request);
if (sender_state)
ret->pushSenderState(sender_state);