stride.cc (8831:6c08a877af8f) | stride.cc (8832:247fee427324) |
---|---|
1/* 2 * Copyright (c) 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; --- 33 unchanged lines hidden (view full) --- 42StridePrefetcher::calculatePrefetch(PacketPtr &pkt, std::list<Addr> &addresses, 43 std::list<Tick> &delays) 44{ 45 if (!pkt->req->hasPC()) { 46 DPRINTF(HWPrefetch, "ignoring request with no PC"); 47 return; 48 } 49 | 1/* 2 * Copyright (c) 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; --- 33 unchanged lines hidden (view full) --- 42StridePrefetcher::calculatePrefetch(PacketPtr &pkt, std::list<Addr> &addresses, 43 std::list<Tick> &delays) 44{ 45 if (!pkt->req->hasPC()) { 46 DPRINTF(HWPrefetch, "ignoring request with no PC"); 47 return; 48 } 49 |
50 if (useContextId && !pkt->req->hasContextId()) { 51 DPRINTF(HWPrefetch, "ignoring request with no context ID"); 52 return; 53 } 54 | |
55 Addr blk_addr = pkt->getAddr() & ~(Addr)(blkSize-1); | 50 Addr blk_addr = pkt->getAddr() & ~(Addr)(blkSize-1); |
56 int ctx_id = useContextId ? pkt->req->contextId() : 0; | 51 MasterID master_id = useMasterId ? pkt->req->masterId() : 0; |
57 Addr pc = pkt->req->getPC(); | 52 Addr pc = pkt->req->getPC(); |
58 assert(ctx_id < Max_Contexts); 59 std::list<StrideEntry*> &tab = table[ctx_id]; | 53 assert(master_id < Max_Contexts); 54 std::list<StrideEntry*> &tab = table[master_id]; |
60 61 /* Scan Table for instAddr Match */ 62 std::list<StrideEntry*>::iterator iter; 63 for (iter = tab.begin(); iter != tab.end(); iter++) { 64 if ((*iter)->instAddr == pc) 65 break; 66 } 67 --- 74 unchanged lines hidden --- | 55 56 /* Scan Table for instAddr Match */ 57 std::list<StrideEntry*>::iterator iter; 58 for (iter = tab.begin(); iter != tab.end(); iter++) { 59 if ((*iter)->instAddr == pc) 60 break; 61 } 62 --- 74 unchanged lines hidden --- |