1/* 2 * Copyright (c) 2012-2014 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 --- 657 unchanged lines hidden (view full) --- 666 (storeQueue[store_idx].inst->effAddr + store_size); 667 bool lower_load_has_store_part = 668 req->getVaddr() < (storeQueue[store_idx].inst->effAddr + 669 store_size); 670 bool upper_load_has_store_part = 671 (req->getVaddr() + req->getSize()) > 672 storeQueue[store_idx].inst->effAddr; 673 |
674 // If the store's data has all of the data needed and the load isn't 675 // LLSC, we can forward. 676 if (store_has_lower_limit && store_has_upper_limit && !req->isLLSC()) { |
677 // Get shift amount for offset into the store's data. 678 int shift_amt = req->getVaddr() - storeQueue[store_idx].inst->effAddr; 679 680 // Allocate memory if this is the first time a load is issued. 681 if (!load_inst->memData) { 682 load_inst->memData = new uint8_t[req->getSize()]; 683 } 684 if (storeQueue[store_idx].isAllZeros) --- 18 unchanged lines hidden (view full) --- 703 // Don't need to do anything special for split loads. 704 if (TheISA::HasUnalignedMemAcc && sreqLow) { 705 delete sreqLow; 706 delete sreqHigh; 707 } 708 709 ++lsqForwLoads; 710 return NoFault; |
711 } else if ( 712 (!req->isLLSC() && 713 ((store_has_lower_limit && lower_load_has_store_part) || 714 (store_has_upper_limit && upper_load_has_store_part) || 715 (lower_load_has_store_part && upper_load_has_store_part))) || 716 (req->isLLSC() && 717 ((store_has_lower_limit || upper_load_has_store_part) && 718 (store_has_upper_limit || lower_load_has_store_part)))) { |
719 // This is the partial store-load forwarding case where a store |
720 // has only part of the load's data and the load isn't LLSC or 721 // the load is LLSC and the store has all or part of the load's 722 // data |
723 724 // If it's already been written back, then don't worry about 725 // stalling on it. 726 if (storeQueue[store_idx].completed) { 727 panic("Should not check one of these"); 728 continue; 729 } 730 --- 185 unchanged lines hidden --- |