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; --- 478 unchanged lines hidden (view full) --- 487{ 488 PCState pc = pcState(); 489 if (!(pc.pc() & 0x3)) 490 return std::make_shared<UnimplementedOpcodeFault>(); 491 492 pc.npc(readMiscRegNoEffect(IPR_EXC_ADDR)); 493 pcState(pc); 494 |
495 CPA::cpa()->swAutoBegin(this, pc.npc()); |
496 497 if (kernelStats) 498 kernelStats->hwrei(); 499 500 // FIXME: XXX check for interrupts? XXX 501 return NoFault; 502} 503 504/** 505 * Check for special simulator handling of specific PAL calls. 506 * If return value is false, actual PAL call will be suppressed. 507 */ 508bool 509SimpleThread::simPalCheck(int palFunc) 510{ 511 if (kernelStats) |
512 kernelStats->callpal(palFunc, this); |
513 514 switch (palFunc) { 515 case PAL::halt: 516 halt(); 517 if (--System::numSystemsRunning == 0) 518 exitSimLoop("all cpus halted"); 519 break; 520 521 case PAL::bpt: 522 case PAL::bugchk: 523 if (system->breakpoint()) 524 return false; 525 break; 526 } 527 528 return true; 529} |