1/* 2 * Copyright (c) 2010-2011 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 31 unchanged lines hidden (view full) --- 40 * Authors: Kevin Lim 41 * Korey Sewell 42 */ 43 44#include "arch/generic/debugfaults.hh" 45#include "arch/locked_mem.hh" 46#include "base/str.hh" 47#include "config/the_isa.hh" |
48#include "cpu/checker/cpu.hh" |
49#include "cpu/o3/lsq.hh" 50#include "cpu/o3/lsq_unit.hh" 51#include "debug/Activity.hh" 52#include "debug/IEW.hh" 53#include "debug/LSQUnit.hh" 54#include "mem/packet.hh" 55#include "mem/request.hh" 56 |
57template<class Impl> 58LSQUnit<Impl>::WritebackEvent::WritebackEvent(DynInstPtr &_inst, PacketPtr _pkt, 59 LSQUnit *lsq_ptr) 60 : Event(Default_Pri, AutoDelete), 61 inst(_inst), pkt(_pkt), lsqPtr(lsq_ptr) 62{ 63} 64 --- 798 unchanged lines hidden (view full) --- 863 864 if (!success) { 865 // Instantly complete this store. 866 DPRINTF(LSQUnit, "Store conditional [sn:%lli] failed. " 867 "Instantly completing it.\n", 868 inst->seqNum); 869 WritebackEvent *wb = new WritebackEvent(inst, data_pkt, this); 870 cpu->schedule(wb, curTick() + 1); |
871 if (cpu->checker) { 872 // Make sure to set the LLSC data for verification 873 // if checker is loaded 874 inst->reqToVerify->setExtraData(0); 875 inst->completeAcc(data_pkt); 876 } |
877 completeStore(storeWBIdx); 878 incrStIdx(storeWBIdx); 879 continue; 880 } 881 } else { 882 // Non-store conditionals do not need a writeback. 883 state->noWB = true; 884 } --- 191 unchanged lines hidden (view full) --- 1076 iewStage->replayMemInst(loadQueue[stallingLoadIdx]); 1077 } 1078 1079 if (!storeQueue[storeWBIdx].inst->isStoreConditional()) { 1080 // The store is basically completed at this time. This 1081 // only works so long as the checker doesn't try to 1082 // verify the value in memory for stores. 1083 storeQueue[storeWBIdx].inst->setCompleted(); |
1084 |
1085 if (cpu->checker) { 1086 cpu->checker->verify(storeQueue[storeWBIdx].inst); 1087 } |
1088 } 1089 1090 if (needsTSO) { 1091 storeInFlight = true; 1092 } 1093 1094 incrStIdx(storeWBIdx); 1095} --- 70 unchanged lines hidden (view full) --- 1166 1167 if (needsTSO) { 1168 storeInFlight = false; 1169 } 1170 1171 // Tell the checker we've completed this instruction. Some stores 1172 // may get reported twice to the checker, but the checker can 1173 // handle that case. |
1174 if (cpu->checker) { 1175 cpu->checker->verify(storeQueue[store_idx].inst); 1176 } |
1177} 1178 1179template <class Impl> 1180bool 1181LSQUnit<Impl>::sendStore(PacketPtr data_pkt) 1182{ 1183 if (!dcachePort->sendTiming(data_pkt)) { 1184 // Need to handle becoming blocked on a store. --- 113 unchanged lines hidden --- |