fetch_impl.hh (9180:ee8d7a51651d) | fetch_impl.hh (9377:6f294e7a93d1) |
---|---|
1/* 2 * Copyright (c) 2010-2011 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 --- 120 unchanged lines hidden (view full) --- 129 " RoundRobin,LSQcount,IQcount}\n"); 130 } 131 132 // Get the size of an instruction. 133 instSize = sizeof(TheISA::MachInst); 134 135 for (int i = 0; i < Impl::MaxThreads; i++) { 136 cacheData[i] = NULL; | 1/* 2 * Copyright (c) 2010-2011 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 --- 120 unchanged lines hidden (view full) --- 129 " RoundRobin,LSQcount,IQcount}\n"); 130 } 131 132 // Get the size of an instruction. 133 instSize = sizeof(TheISA::MachInst); 134 135 for (int i = 0; i < Impl::MaxThreads; i++) { 136 cacheData[i] = NULL; |
137 decoder[i] = new TheISA::Decoder(NULL); | 137 decoder[i] = new TheISA::Decoder; |
138 } 139} 140 141template <class Impl> 142std::string 143DefaultFetch<Impl>::name() const 144{ 145 return cpu->name() + ".fetch"; --- 1074 unchanged lines hidden (view full) --- 1220 Addr pcAddr = thisPC.instAddr() & BaseCPU::PCMask; 1221 while (fetchAddr != pcAddr && blkOffset < numInsts) { 1222 blkOffset++; 1223 fetchAddr += instSize; 1224 } 1225 if (blkOffset >= numInsts) 1226 break; 1227 } | 138 } 139} 140 141template <class Impl> 142std::string 143DefaultFetch<Impl>::name() const 144{ 145 return cpu->name() + ".fetch"; --- 1074 unchanged lines hidden (view full) --- 1220 Addr pcAddr = thisPC.instAddr() & BaseCPU::PCMask; 1221 while (fetchAddr != pcAddr && blkOffset < numInsts) { 1222 blkOffset++; 1223 fetchAddr += instSize; 1224 } 1225 if (blkOffset >= numInsts) 1226 break; 1227 } |
1228 MachInst inst = TheISA::gtoh(cacheInsts[blkOffset]); | |
1229 | 1228 |
1230 decoder[tid]->setTC(cpu->thread[tid]->getTC()); | 1229 MachInst inst = TheISA::gtoh(cacheInsts[blkOffset]); |
1231 decoder[tid]->moreBytes(thisPC, fetchAddr, inst); 1232 1233 if (decoder[tid]->needMoreBytes()) { 1234 blkOffset++; 1235 fetchAddr += instSize; 1236 pcOffset += instSize; 1237 } 1238 } --- 371 unchanged lines hidden --- | 1230 decoder[tid]->moreBytes(thisPC, fetchAddr, inst); 1231 1232 if (decoder[tid]->needMoreBytes()) { 1233 blkOffset++; 1234 fetchAddr += instSize; 1235 pcOffset += instSize; 1236 } 1237 } --- 371 unchanged lines hidden --- |