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"]};
CheckAInB[a: ks.rosemaryStores, b: sim.lastInstrOps];
CheckAInB[a: sim.lastInstrOps, b: ks.rosemaryStores];
IF basicInst.op=dKFC
THEN deltaInstrCount𡤀 --
ELSE 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 Cluster.SetSuccessHalt[TRUE]
ELSE IF (basicInst.op = x000b)
OR (basicInst.op = x377b)
THEN SIGNAL Cluster.Breakpoint} };