Deleted Added
sdiff udiff text old ( 9044:904ddeecc653 ) new ( 9046:a1104cc13db2 )
full compact
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 261 unchanged lines hidden (view full) ---

270 MasterPort *dcachePort;
271
272 /** Derived class to hold any sender state the LSQ needs. */
273 class LSQSenderState : public Packet::SenderState
274 {
275 public:
276 /** Default constructor. */
277 LSQSenderState()
278 : noWB(false), isSplit(false), pktToSend(false), outstanding(1),
279 mainPkt(NULL), pendingPacket(NULL)
280 { }
281
282 /** Instruction who initiated the access to memory. */
283 DynInstPtr inst;
284 /** Whether or not it is a load. */
285 bool isLoad;
286 /** The LQ/SQ index of the instruction. */
287 int idx;
288 /** Whether or not the instruction will need to writeback. */
289 bool noWB;
290 /** Whether or not this access is split in two. */
291 bool isSplit;
292 /** Whether or not there is a packet that needs sending. */
293 bool pktToSend;
294 /** Number of outstanding packets to complete. */
295 int outstanding;
296 /** The main packet from a split load, used during writeback. */
297 PacketPtr mainPkt;
298 /** A second packet from a split store that needs sending. */
299 PacketPtr pendingPacket;
300
301 /** Completes a packet and returns whether the access is finished. */
302 inline bool complete() { return --outstanding == 0; }
303 };
304
305 /** Writeback event, specifically for when stores forward data to loads. */
306 class WritebackEvent : public Event {
307 public:

--- 29 unchanged lines hidden (view full) ---

337
338 /** Constructs a store queue entry for a given instruction. */
339 SQEntry(DynInstPtr &_inst)
340 : inst(_inst), req(NULL), sreqLow(NULL), sreqHigh(NULL), size(0),
341 isSplit(0), canWB(0), committed(0), completed(0)
342 {
343 std::memset(data, 0, sizeof(data));
344 }
345
346 /** The store instruction. */
347 DynInstPtr inst;
348 /** The request for the store. */
349 RequestPtr req;
350 /** The split requests for the store. */
351 RequestPtr sreqLow;
352 RequestPtr sreqHigh;
353 /** The size of the store. */
354 int size;
355 /** The store data. */
356 char data[16];
357 /** Whether or not the store is split into two requests. */
358 bool isSplit;
359 /** Whether or not the store can writeback. */
360 bool canWB;
361 /** Whether or not the store is committed. */
362 bool committed;
363 /** Whether or not the store is completed. */
364 bool completed;

--- 223 unchanged lines hidden (view full) ---

588 load_idx, store_idx, storeHead, req->getPaddr(),
589 sreqLow ? " split" : "");
590
591 if (req->isLLSC()) {
592 assert(!sreqLow);
593 // Disable recording the result temporarily. Writing to misc
594 // regs normally updates the result, but this is not the
595 // desired behavior when handling store conditionals.
596 load_inst->recordResult = false;
597 TheISA::handleLockedRead(load_inst.get(), req);
598 load_inst->recordResult = true;
599 }
600
601 if (req->isMmappedIpr()) {
602 assert(!load_inst->memData);
603 load_inst->memData = new uint8_t[64];
604
605 ThreadContext *thread = cpu->tcBase(lsqID);
606 Tick delay;

--- 39 unchanged lines hidden (view full) ---

646
647 store_size = storeQueue[store_idx].size;
648
649 if (store_size == 0)
650 continue;
651 else if (storeQueue[store_idx].inst->uncacheable())
652 continue;
653
654 assert(storeQueue[store_idx].inst->effAddrValid);
655
656 // Check if the store data is within the lower and upper bounds of
657 // addresses that the request needs.
658 bool store_has_lower_limit =
659 req->getVaddr() >= storeQueue[store_idx].inst->effAddr;
660 bool store_has_upper_limit =
661 (req->getVaddr() + req->getSize()) <=
662 (storeQueue[store_idx].inst->effAddr + store_size);

--- 253 unchanged lines hidden ---