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; --- 391 unchanged lines hidden (view full) --- 400template <class MemDepPred, class Impl> 401void 402MemDepUnit<MemDepPred, Impl>::completeBarrier(DynInstPtr &inst) 403{ 404 wakeDependents(inst); 405 completed(inst); 406 407 InstSeqNum barr_sn = inst->seqNum; |
408 DPRINTF(MemDepUnit, "barrier completed: %s SN:%lli\n", inst->pcState(), 409 inst->seqNum); |
410 if (inst->isMemBarrier()) { |
411 if (loadBarrierSN == barr_sn) 412 loadBarrier = false; 413 if (storeBarrierSN == barr_sn) 414 storeBarrier = false; 415 } else if (inst->isWriteBarrier()) { |
416 if (storeBarrierSN == barr_sn) 417 storeBarrier = false; 418 } 419} 420 421template <class MemDepPred, class Impl> 422void 423MemDepUnit<MemDepPred, Impl>::wakeDependents(DynInstPtr &inst) --- 50 unchanged lines hidden (view full) --- 474 MemDepHashIt hash_it; 475 476 while (!instList[tid].empty() && 477 (*squash_it)->seqNum > squashed_num) { 478 479 DPRINTF(MemDepUnit, "Squashing inst [sn:%lli]\n", 480 (*squash_it)->seqNum); 481 |
482 if ((*squash_it)->seqNum == loadBarrierSN) 483 loadBarrier = false; 484 485 if ((*squash_it)->seqNum == storeBarrierSN) 486 storeBarrier = false; 487 |
488 hash_it = memDepHash.find((*squash_it)->seqNum); 489 490 assert(hash_it != memDepHash.end()); 491 492 (*hash_it).second->squashed = true; 493 494 (*hash_it).second = NULL; 495 --- 13 unchanged lines hidden (view full) --- 509void 510MemDepUnit<MemDepPred, Impl>::violation(DynInstPtr &store_inst, 511 DynInstPtr &violating_load) 512{ 513 DPRINTF(MemDepUnit, "Passing violating PCs to store sets," 514 " load: %#x, store: %#x\n", violating_load->instAddr(), 515 store_inst->instAddr()); 516 // Tell the memory dependence unit of the violation. |
517 depPred.violation(store_inst->instAddr(), violating_load->instAddr()); |
518} 519 520template <class MemDepPred, class Impl> 521void 522MemDepUnit<MemDepPred, Impl>::issue(DynInstPtr &inst) 523{ 524 DPRINTF(MemDepUnit, "Issuing instruction PC %#x [sn:%lli].\n", 525 inst->instAddr(), inst->seqNum); --- 58 unchanged lines hidden --- |