Deleted Added
sdiff udiff text old ( 3230:e86a03911728 ) new ( 3326:d9cc6bae9d77 )
full compact
1/*
2 * Copyright (c) 2004-2005 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;

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

24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Kevin Lim
29 * Korey Sewell
30 */
31
32#include "config/use_checker.hh"
33
34#include "cpu/o3/lsq.hh"
35#include "cpu/o3/lsq_unit.hh"
36#include "base/str.hh"
37#include "mem/packet.hh"
38#include "mem/request.hh"
39

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

609 DPRINTF(LSQUnit, "D-Cache: Writing back store idx:%i PC:%#x "
610 "to Addr:%#x, data:%#x [sn:%lli]\n",
611 storeWBIdx, inst->readPC(),
612 req->getPaddr(), *(inst->memData),
613 inst->seqNum);
614
615 // @todo: Remove this SC hack once the memory system handles it.
616 if (req->isLocked()) {
617 if (req->isUncacheable()) {
618 req->setScResult(2);
619 } else {
620 if (cpu->lockFlag) {
621 req->setScResult(1);
622 DPRINTF(LSQUnit, "Store conditional [sn:%lli] succeeded.",
623 inst->seqNum);
624 } else {
625 req->setScResult(0);
626 // Hack: Instantly complete this store.
627// completeDataAccess(data_pkt);
628 DPRINTF(LSQUnit, "Store conditional [sn:%lli] failed. "
629 "Instantly completing it.\n",
630 inst->seqNum);
631 WritebackEvent *wb = new WritebackEvent(inst, data_pkt, this);
632 wb->schedule(curTick + 1);
633 delete state;
634 completeStore(storeWBIdx);
635 incrStIdx(storeWBIdx);
636 continue;
637 }
638 }
639 } else {
640 // Non-store conditionals do not need a writeback.
641 state->noWB = true;
642 }
643
644 if (!dcachePort->sendTiming(data_pkt)) {
645 if (data_pkt->result == Packet::BadAddress) {

--- 333 unchanged lines hidden ---