1 2/* 3 * Copyright (c) 2010-2014, 2017 ARM Limited 4 * Copyright (c) 2013 Advanced Micro Devices, Inc. 5 * All rights reserved 6 * 7 * The license below extends only to copyright in the software and shall 8 * not be construed as granting a license to any other intellectual --- 65 unchanged lines hidden (view full) --- 74{ 75 assert(!lsqPtr->cpu->switchedOut()); 76 77 lsqPtr->writeback(inst, pkt); 78 79 if (pkt->senderState) 80 delete pkt->senderState; 81 |
82 delete pkt; 83} 84 85template<class Impl> 86const char * 87LSQUnit<Impl>::WritebackEvent::description() const 88{ 89 return "Store writeback"; --- 37 unchanged lines hidden (view full) --- 127 } 128 129 if (inst->isStore()) { 130 completeStore(state->idx); 131 } 132 } 133 134 if (TheISA::HasUnalignedMemAcc && state->isSplit && state->isLoad) { |
135 delete state->mainPkt; 136 } 137 138 pkt->req->setAccessLatency(); 139 cpu->ppDataAccessComplete->notify(std::make_pair(inst, pkt)); 140 141 delete state; 142} --- 681 unchanged lines hidden (view full) --- 824 825 if (TheISA::HasUnalignedMemAcc && storeQueue[storeWBIdx].isSplit) { 826 assert(storeQueue[storeWBIdx].sreqLow); 827 assert(storeQueue[storeWBIdx].sreqHigh); 828 } 829 830 DynInstPtr inst = storeQueue[storeWBIdx].inst; 831 |
832 RequestPtr &req = storeQueue[storeWBIdx].req; 833 const RequestPtr &sreqLow = storeQueue[storeWBIdx].sreqLow; 834 const RequestPtr &sreqHigh = storeQueue[storeWBIdx].sreqHigh; |
835 836 storeQueue[storeWBIdx].committed = true; 837 838 assert(!inst->memData); 839 inst->memData = new uint8_t[req->getSize()]; 840 841 if (storeQueue[storeWBIdx].isAllZeros) 842 memset(inst->memData, 0, req->getSize()); --- 24 unchanged lines hidden (view full) --- 867 868 data_pkt->senderState = state; 869 snd_data_pkt->senderState = state; 870 871 state->isSplit = true; 872 state->outstanding = 2; 873 874 // Can delete the main request now. |
875 req = sreqLow; 876 } 877 878 DPRINTF(LSQUnit, "D-Cache: Writing back store idx:%i PC:%s " 879 "to Addr:%#x, data:%#x [sn:%lli]\n", 880 storeWBIdx, inst->pcState(), 881 req->getPaddr(), (int)*(inst->memData), 882 inst->seqNum); --- 32 unchanged lines hidden (view full) --- 915 if (req->isMmappedIpr()) { 916 assert(!inst->isStoreConditional()); 917 TheISA::handleIprWrite(thread, data_pkt); 918 delete data_pkt; 919 if (split) { 920 assert(snd_data_pkt->req->isMmappedIpr()); 921 TheISA::handleIprWrite(thread, snd_data_pkt); 922 delete snd_data_pkt; |
923 } 924 delete state; |
925 completeStore(storeWBIdx); 926 incrStIdx(storeWBIdx); 927 } else if (!sendStore(data_pkt)) { 928 DPRINTF(IEW, "D-Cache became blocked when writing [sn:%lli], will" 929 "retry later\n", 930 inst->seqNum); 931 932 // Need to store the second packet, if split. --- 117 unchanged lines hidden (view full) --- 1050 // Clear the smart pointer to make sure it is decremented. 1051 storeQueue[store_idx].inst->setSquashed(); 1052 storeQueue[store_idx].inst = NULL; 1053 storeQueue[store_idx].canWB = 0; 1054 1055 // Must delete request now that it wasn't handed off to 1056 // memory. This is quite ugly. @todo: Figure out the proper 1057 // place to really handle request deletes. |
1058 storeQueue[store_idx].req.reset(); |
1059 if (TheISA::HasUnalignedMemAcc && storeQueue[store_idx].isSplit) { |
1060 storeQueue[store_idx].sreqLow.reset(); 1061 storeQueue[store_idx].sreqHigh.reset(); |
1062 } 1063 |
1064 --stores; 1065 1066 // Inefficient! 1067 storeTail = store_idx; 1068 1069 decrStIdx(store_idx); 1070 ++lsqSquashedStores; 1071 } --- 254 unchanged lines hidden --- |