base.cc (5108:3b59ba14a7f3) base.cc (5120:b999773ab81f)
1/*
2 * Copyright (c) 2002-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;

--- 449 unchanged lines hidden (view full) ---

458
459void
460BaseSimpleCPU::advancePC(Fault fault)
461{
462 //Since we're moving to a new pc, zero out the offset
463 fetchOffset = 0;
464 if (fault != NoFault) {
465 curMacroStaticInst = StaticInst::nullStaticInstPtr;
1/*
2 * Copyright (c) 2002-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;

--- 449 unchanged lines hidden (view full) ---

458
459void
460BaseSimpleCPU::advancePC(Fault fault)
461{
462 //Since we're moving to a new pc, zero out the offset
463 fetchOffset = 0;
464 if (fault != NoFault) {
465 curMacroStaticInst = StaticInst::nullStaticInstPtr;
466 predecoder.reset();
466 fault->invoke(tc);
467 thread->setMicroPC(0);
468 thread->setNextMicroPC(1);
469 } else {
470 //If we're at the last micro op for this instruction
471 if (curStaticInst && curStaticInst->isLastMicroop()) {
472 //We should be working with a macro op
473 assert(curMacroStaticInst);

--- 14 unchanged lines hidden (view full) ---

488 // go to the next instruction
489 thread->setPC(thread->readNextPC());
490 thread->setNextPC(thread->readNextNPC());
491 thread->setNextNPC(thread->readNextNPC() + sizeof(MachInst));
492 assert(thread->readNextPC() != thread->readNextNPC());
493 }
494 }
495
467 fault->invoke(tc);
468 thread->setMicroPC(0);
469 thread->setNextMicroPC(1);
470 } else {
471 //If we're at the last micro op for this instruction
472 if (curStaticInst && curStaticInst->isLastMicroop()) {
473 //We should be working with a macro op
474 assert(curMacroStaticInst);

--- 14 unchanged lines hidden (view full) ---

489 // go to the next instruction
490 thread->setPC(thread->readNextPC());
491 thread->setNextPC(thread->readNextNPC());
492 thread->setNextNPC(thread->readNextNPC() + sizeof(MachInst));
493 assert(thread->readNextPC() != thread->readNextNPC());
494 }
495 }
496
497#if FULL_SYSTEM
496 Addr oldpc;
497 do {
498 oldpc = thread->readPC();
499 system->pcEventQueue.service(tc);
500 } while (oldpc != thread->readPC());
498 Addr oldpc;
499 do {
500 oldpc = thread->readPC();
501 system->pcEventQueue.service(tc);
502 } while (oldpc != thread->readPC());
503#endif
501}
502
504}
505