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(); |
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 |
498 Addr oldpc; 499 do { 500 oldpc = thread->readPC(); 501 system->pcEventQueue.service(tc); 502 } while (oldpc != thread->readPC()); |
503#endif |
504} 505 |