371,372c371
< //If we're not in the middle of a macro instruction
< if (!curMacroStaticInst) {
---
> MicroPC upc = thread->readMicroPC();
373a373,377
> if (isRomMicroPC(upc)) {
> stayAtPC = false;
> curStaticInst = microcodeRom.fetchMicroop(upc, curMacroStaticInst);
> } else if (!curMacroStaticInst) {
> //We're not in the middle of a macro instruction
404,405c408
< curStaticInst = curMacroStaticInst->
< fetchMicroop(thread->readMicroPC());
---
> curStaticInst = curMacroStaticInst->fetchMicroop(upc);
411,412c414
< curStaticInst = curMacroStaticInst->
< fetchMicroop(thread->readMicroPC());
---
> curStaticInst = curMacroStaticInst->fetchMicroop(upc);
472,473c474,475
< thread->setMicroPC(0);
< thread->setNextMicroPC(1);
---
> thread->setMicroPC(normalMicroPC(0));
> thread->setNextMicroPC(normalMicroPC(1));
478,479c480,482
< //We should be working with a macro op
< assert(curMacroStaticInst);
---
> //We should be working with a macro op or be in the ROM
> assert(curMacroStaticInst ||
> isRomMicroPC(thread->readMicroPC()));
483,484c486,487
< thread->setMicroPC(0);
< thread->setNextMicroPC(1);
---
> thread->setMicroPC(normalMicroPC(0));
> thread->setNextMicroPC(normalMicroPC(1));
487c490
< if (curMacroStaticInst) {
---
> if (curMacroStaticInst || isRomMicroPC(thread->readMicroPC())) {