73c73
< : BaseCPU(p), thread(NULL), predecoder(NULL)
---
> : BaseCPU(p), traceData(NULL), thread(NULL), predecoder(NULL)
94,96d93
<
< fetchOffset = 0;
< stayAtPC = false;
331a329,330
> uint64_t threadPC = thread->readPC();
>
334c333
< DPRINTF(Fetch,"Fetch: PC:%08p NPC:%08p NNPC:%08p\n",thread->readPC(),
---
> DPRINTF(Fetch,"Fetch: PC:%08p NPC:%08p NNPC:%08p\n",threadPC,
337c336
< DPRINTF(Fetch,"Fetch: PC:%08p NPC:%08p",thread->readPC(),
---
> DPRINTF(Fetch,"Fetch: PC:%08p NPC:%08p",threadPC,
341,343c340,342
< const Addr PCMask = ~(sizeof(MachInst) - 1);
< Addr fetchPC = thread->readPC() + fetchOffset;
< req->setVirt(0, fetchPC & PCMask, sizeof(MachInst), 0, thread->readPC());
---
> req->setVirt(0, threadPC & ~3, sizeof(MachInst),
> (FULL_SYSTEM && (threadPC & 1)) ? PHYSICAL : 0,
> threadPC);
371d369
<
374d371
<
381d377
< const Addr PCMask = ~(sizeof(MachInst) - 1);
383,384c379
< predecoder.moreBytes((thread->readPC() & PCMask) + fetchOffset,
< 0, inst);
---
> predecoder.moreBytes(thread->readPC(), 0, inst);
387,394c382,383
<
< //If an instruction is ready, decode it. Otherwise, we'll have to
< //fetch beyond the MachInst at the current pc.
< if (predecoder.extMachInstReady()) {
< #if THE_ISA == X86_ISA
< thread->setNextPC(thread->readPC() + predecoder.getInstSize());
< #endif // X86_ISA
< stayAtPC = false;
---
> //If an instruction is ready, decode it
> if (predecoder.extMachInstReady())
396,399d384
< } else {
< stayAtPC = true;
< fetchOffset += sizeof(MachInst);
< }
415a401
> #if TRACING_ON
428a415
> #endif // TRACING_ON
467,468d453
< //Since we're moving to a new pc, zero out the offset
< fetchOffset = 0;
474c459
< } else {
---
> } else if (predecoder.needMoreBytes()) {