IF sim #
NIL
THEN {
Get Lizard to do the same instruction, and then compare them.
lizardNewPC: Dragon.Word ← DragOpsCrossUtils.WordToCard[sim.processor.regs[ifuPC]];
DragonRosemary.Assert[ sim.processor.stats.instructions = basicInst.instr , "Cluster & Lizard instruction counts disagree"];
DragonRosemary.Assert[ lizardNewPC = basicInst.pc , "Cluster & Lizard PC's disagree"];
LizardHeart.InstructionExecute[sim.processor];
IF basicInst.trapped
AND basicInst.trapPC = ifuPageFaultPC
THEN
{ -- "execute" the Lizard instruction that causes the page fault
oldStatus: Dragon.RegStore;
LizardHeart.InstructionExecute[sim.processor]; -- the faulting instruction
deltaInstrCount ← 1;
oldStatus ← NARROW[sim.lastInstrOps.first];
DragonRosemary.Assert[oldStatus.instr = sim.processor.stats.instructions,
"Couldn't find Lizard's save of processor status for IFU page fault"];
oldStatus.instr ← oldStatus.instr-1; -- conforms with Rosemary's view
};
CheckAInB[a: ks.rosemaryStores, b: sim.lastInstrOps];
CheckAInB[a: sim.lastInstrOps, b: ks.rosemaryStores];
DragonRosemary.Assert[ (sim.control=doAbort) = basicInst.trapped, "Cluster & Lizard disagree about trap"];
}; -- end of Lizard check
IF basicInst.op = x377B
AND basicInst.alpha = 0FFH
AND basicInst.beta = 0FFH
THEN
ERROR Cluster2.SuccessHalt;