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 "arch/locked_mem.hh" |
33#include "config/use_checker.hh" 34 35#include "cpu/o3/lsq.hh" 36#include "cpu/o3/lsq_unit.hh" 37#include "base/str.hh" 38#include "mem/packet.hh" 39#include "mem/request.hh" 40 --- 570 unchanged lines hidden (view full) --- 611 DPRINTF(LSQUnit, "D-Cache: Writing back store idx:%i PC:%#x " 612 "to Addr:%#x, data:%#x [sn:%lli]\n", 613 storeWBIdx, inst->readPC(), 614 req->getPaddr(), *(inst->memData), 615 inst->seqNum); 616 617 // @todo: Remove this SC hack once the memory system handles it. 618 if (req->isLocked()) { |
619 // Disable recording the result temporarily. Writing to 620 // misc regs normally updates the result, but this is not 621 // the desired behavior when handling store conditionals. 622 inst->recordResult = false; 623 bool success = TheISA::handleLockedWrite(inst.get(), req); 624 inst->recordResult = true; 625 626 if (!success) { 627 // Instantly complete this store. 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 } else { 639 // Non-store conditionals do not need a writeback. 640 state->noWB = true; 641 } 642 643 if (!dcachePort->sendTiming(data_pkt)) { 644 if (data_pkt->result == Packet::BadAddress) { --- 333 unchanged lines hidden --- |